From 7a4b1be3353e8e72a3499f2ad2daa8e68d1878ce Mon Sep 17 00:00:00 2001 From: Steven Pritchard Date: Thu, 23 Oct 2025 16:06:38 -0500 Subject: [PATCH 1/2] Add release workflow --- .github/workflows/release.yml | 56 +++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..a2da0cd --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,56 @@ +--- +name: Build and Push Container + +'on': + push: + tags: + - 'v*.*.*' + - '*.*.*' + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository_owner }}/sandbox + +jobs: + build-and-push: + name: Build and Push Docker Image + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - name: Checkout code + uses: actions/checkout@v5 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract metadata + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=sha,prefix={{branch}}- + type=raw,value=latest + + - name: Build and push Docker image + uses: docker/build-push-action@v6 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max From 1e206b4da4acdd2afdce0db54fe441fc57849d61 Mon Sep 17 00:00:00 2001 From: Steven Pritchard Date: Thu, 23 Oct 2025 16:14:28 -0500 Subject: [PATCH 2/2] Fix build error --- .github/workflows/release.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a2da0cd..c5f4340 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,6 +2,7 @@ name: Build and Push Container 'on': + workflow_dispatch: push: tags: - 'v*.*.*' @@ -42,7 +43,7 @@ jobs: type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} - type=sha,prefix={{branch}}- + type=sha,prefix=sha- type=raw,value=latest - name: Build and push Docker image