Skip to content

Commit

Permalink
update build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sprsquish committed Apr 14, 2024
1 parent 31cbc69 commit 7383721
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,36 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

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

- name: BuildX Install
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
id: buildx
with:
install: true

- name: Login to GitHub Container Registry
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build
run: |
docker build \
--platform linux/amd64,linux/arm64 \
--tag ghcr.io/${{ github.repository }}:${{ github.sha }} \
--tag ghcr.io/${{ github.repository }}:latest \
--output "type=image,push=true" \
.
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/${{ github.repository }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 7383721

Please sign in to comment.