Supported build for now only

This commit is contained in:
netkas 2025-05-16 01:25:40 -04:00
parent 72da412737
commit 81e1eac9e4
Signed by: netkas
GPG key ID: 4D8629441B76E4CC

View file

@ -13,7 +13,7 @@ permissions:
contents: read
jobs:
build-and-save:
build:
runs-on: ubuntu-latest
if: github.event_name == 'push'
steps:
@ -34,43 +34,7 @@ jobs:
docker save $IMAGE_NAME:${{ github.sha }} > docker-image-${{ github.sha }}.tar
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4 # Updated to v4
with:
name: docker-image-${{ github.sha }}
path: docker-image-${{ github.sha }}.tar
build-and-push:
runs-on: ubuntu-latest
if: github.event_name == 'release'
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
registry: docker.io
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
tags: |
ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }}
ghcr.io/${{ github.repository }}:latest
docker.io/your-dockerhub-username:${{ github.event.release.tag_name }}
docker.io/your-dockerhub-username:latest
push: true
path: docker-image-${{ github.sha }}.tar