From 50d30d252d5dbb8d8793d75e84606b1dc4b8723d Mon Sep 17 00:00:00 2001 From: Bert Wagner Date: Tue, 18 Nov 2025 19:54:40 -0500 Subject: [PATCH 1/2] adds push to ghcr --- .github/workflows/docker-image.yml | 32 ++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) mode change 100644 => 100755 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml old mode 100644 new mode 100755 index 9d65a66..42ae9f1 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -11,8 +11,36 @@ jobs: build: runs-on: ubuntu-latest + permissions: + contents: read + packages: write steps: - uses: actions/checkout@v4 - - name: Build the Docker image - run: docker build . --file backend/Dockerfile --tag splashflag:$(date +%s) + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository }} + tags: | + type=ref,event=branch + type=ref,event=pr + type=sha,prefix={{branch}}- + type=raw,value=latest,enable={{is_default_branch}} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + file: backend/Dockerfile + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} From a05bfb2436230f0ab90bbc25eecd1a0027372e4e Mon Sep 17 00:00:00 2001 From: Bert Wagner Date: Tue, 18 Nov 2025 19:57:28 -0500 Subject: [PATCH 2/2] adds manual workflow dispatch --- backend/Dockerfile | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 backend/Dockerfile diff --git a/backend/Dockerfile b/backend/Dockerfile old mode 100644 new mode 100755