Skip to content

Commit

Permalink
feat: use buildx to build on arm and amd arch
Browse files Browse the repository at this point in the history
  • Loading branch information
dedsxc committed Jun 11, 2024
1 parent c291bf2 commit 5129a9f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 40 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
echo "repo_name=$result" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3

- name: Configure Docker
uses: docker/login-action@v1
Expand All @@ -73,8 +73,7 @@ jobs:

- name: Build and Push Docker image
run: |
docker build -t ${{ env.GHCR_REGISTRY }}/${{ env.GHCR_REGISTRY_REPO }}/${{ steps.get_repo_name.outputs.repo_name }}:${{ needs.dev-tag.outputs.new_tag }} .
docker push ${{ env.GHCR_REGISTRY }}/${{ env.GHCR_REGISTRY_REPO }}/${{ steps.get_repo_name.outputs.repo_name }}:${{ needs.dev-tag.outputs.new_tag }}
docker buildx build --push --platform linux/arm64,linux/amd64 -t ${{ env.GHCR_REGISTRY }}/${{ env.GHCR_REGISTRY_REPO }}/${{ steps.get_repo_name.outputs.repo_name }}:${{ needs.dev-tag.outputs.new_tag }} .
# Setup and run vulnerability scanner
- name: Setup trivy markdown template
Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/lint.yaml

This file was deleted.

6 changes: 4 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ jobs:
result=$(echo "$GITHUB_REPOSITORY" | awk -F'/' '{print $2}')
echo "repo_name=$result" >> $GITHUB_OUTPUT
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3

- name: Configure Docker
uses: docker/login-action@v1
with:
Expand All @@ -72,8 +75,7 @@ jobs:

- name: Build and Push Docker image
run: |
docker build -t ${{ env.GHCR_REGISTRY }}/${{ env.GHCR_REGISTRY_REPO }}/${{ steps.get_repo_name.outputs.repo_name }}:${{ needs.stable-tag.outputs.new_tag }} .
docker push ${{ env.GHCR_REGISTRY }}/${{ env.GHCR_REGISTRY_REPO }}/${{ steps.get_repo_name.outputs.repo_name }}:${{ needs.stable-tag.outputs.new_tag }}
docker buildx build --push --platform linux/arm64,linux/amd64 -t ${{ env.GHCR_REGISTRY }}/${{ env.GHCR_REGISTRY_REPO }}/${{ steps.get_repo_name.outputs.repo_name }}:${{ needs.stable-tag.outputs.new_tag }} .
release:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 5129a9f

Please sign in to comment.