Skip to content

Commit

Permalink
added multi-arch capabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
saidsef committed Sep 6, 2021
1 parent fa2174c commit c9aa0bd
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,30 @@ jobs:
echo "DATE=v$(echo `date +'%Y.%m'`)" >> $GITHUB_ENV
- name: Login to DockerHub
uses: docker/login-action@v1
if: success()
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all
- name: Set up Docker Buildx
id: buildx
if: success()
uses: docker/setup-buildx-action@v1
env:
DOCKER_BUILDKIT: 1
- name: Build and push Docker image - (TAG)
uses: docker/build-push-action@v2
if: success()
env:
DOCKER_BUILDKIT: 1
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
pull: true
push: true
tags: docker.io/saidsef/aws-kinesis-local:${{ env.TAG == 'master' && 'latest' || env.TAG }}
- name: Build and push Docker image - (MAIN)
Expand All @@ -42,17 +57,22 @@ jobs:
DOCKER_BUILDKIT: 1
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
pull: true
push: true
tags: docker.io/saidsef/aws-kinesis-local:${{ env.DATE }}
- name: Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
if: success()
with:
image-ref: docker.io/saidsef/aws-kinesis-local:${{ env.TAG }}
image-ref: docker.io/saidsef/aws-kinesis-local:${{ env.TAG == 'master' && 'latest' || env.TAG }}
format: 'template'
template: '@/contrib/sarif.tpl'
output: 'trivy-results.sarif'
- name: Upload Trivy scan results to GitHub Security
uses: github/codeql-action/upload-sarif@v1
if: success()
with:
sarif_file: 'trivy-results.sarif'

Expand Down

0 comments on commit c9aa0bd

Please sign in to comment.