podman
This commit is contained in:
parent
b3c80ca8de
commit
cc2d68e998
1 changed files with 5 additions and 18 deletions
|
|
@ -10,15 +10,11 @@ on:
|
|||
jobs:
|
||||
build:
|
||||
runs-on: arch-latest
|
||||
container:
|
||||
image: archlinux:latest
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
outputs:
|
||||
image_tag: ${{ steps.build_image.outputs.image_tag }}
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
run: pacman -Syu --noconfirm git nodejs npm docker
|
||||
run: pacman -Syu --noconfirm git nodejs npm podman
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v6
|
||||
|
|
@ -26,13 +22,8 @@ jobs:
|
|||
- name: Build and push Docker image
|
||||
id: build_image
|
||||
run: |
|
||||
# Verify Docker socket is accessible
|
||||
echo "Checking Docker connection..."
|
||||
docker info > /dev/null 2>&1 || { echo "Docker not accessible"; exit 1; }
|
||||
docker ps
|
||||
|
||||
# Login to Forgejo registry
|
||||
echo "${{ secrets.FORGEJO_TOKEN }}" | docker login ${{ secrets.FORGEJO_REGISTRY }} -u ${{ secrets.FORGEJO_USER }} --password-stdin
|
||||
echo "${{ secrets.FORGEJO_TOKEN }}" | podman login ${{ secrets.FORGEJO_REGISTRY }} -u ${{ secrets.FORGEJO_USER }} --password-stdin
|
||||
|
||||
# Create versioned tags
|
||||
SHORT_SHA=${GITHUB_SHA::8}
|
||||
|
|
@ -41,21 +32,17 @@ jobs:
|
|||
IMAGE_LATEST=${IMAGE_BASE}:latest
|
||||
|
||||
# Build image with multiple tags
|
||||
docker build -t $IMAGE_TAG -t $IMAGE_LATEST .
|
||||
podman build -t $IMAGE_TAG -t $IMAGE_LATEST .
|
||||
|
||||
# Push both tags
|
||||
docker push $IMAGE_TAG
|
||||
docker push $IMAGE_LATEST
|
||||
podman push $IMAGE_TAG
|
||||
podman push $IMAGE_LATEST
|
||||
|
||||
# Output the specific tag for deployment
|
||||
echo "image_tag=${IMAGE_TAG}" >> $GITHUB_OUTPUT
|
||||
|
||||
deploy:
|
||||
runs-on: arch-latest
|
||||
container:
|
||||
image: archlinux:latest
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
needs: build
|
||||
steps:
|
||||
- name: Install dependencies
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue