Skip to content

Commit

Permalink
Build and Push to ghcr
Browse files Browse the repository at this point in the history
  • Loading branch information
ab-smith committed Apr 13, 2024
1 parent 6a3b00a commit 22d0319
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/docker-build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 0 # Ensure all history and tags are fetched

- name: Get git version
id: git_version
run: echo "VERSION=$(git describe --tags --always)" >> $GITHUB_ENV
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
Expand All @@ -28,6 +30,9 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Get git version
run: echo "VERSION=$(git describe --tags --always)" >> $GITHUB_ENV

- name: Build and Push Backend Docker Image
uses: docker/build-push-action@v5
with:
Expand All @@ -37,6 +42,7 @@ jobs:
tags: |
ghcr.io/${{ github.repository }}/backend:${{ env.VERSION }}
ghcr.io/${{ github.repository }}/backend:latest
platforms: linux/amd64,linux/arm64,linux/arm64/v8

- name: Build and Push Frontend Docker Image
uses: docker/build-push-action@v5
Expand All @@ -47,3 +53,4 @@ jobs:
tags: |
ghcr.io/${{ github.repository }}/frontend:${{ env.VERSION }}
ghcr.io/${{ github.repository }}/frontend:latest
platforms: linux/amd64,linux/arm64,linux/arm64/v8

0 comments on commit 22d0319

Please sign in to comment.