Skip to content

Build arm64 image on GitHub Actions #39

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Build
env:
REPO: ${{ github.repository }}
shell: bash
run: |
echo "docker_repo=${{ env.REPO }}" >> $GITHUB_ENV
make build
make build && make build-arm64
- name: Trivy vulnerability scanner
uses: aquasecurity/[email protected]
with:
Expand All @@ -26,26 +28,39 @@ jobs:
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
- name: Trivy vulnerability scanner on arm64 image
uses: aquasecurity/[email protected]
with:
image-ref: '${{ env.docker_repo }}:latest-arm64'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Build
shell: bash
run: make build
run: make build && make build-arm64
- name: Test
run: make test
run: make test
publish:
needs: [scan, test]
if: github.repository == 'rust-serverless/lambda-rust'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Build
shell: bash
run: make build
run: make build && make build-arm64
- name: Publish Latest
shell: bash
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
make publish
make publish && make publish-arm64
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Build
shell: bash
run: make build
run: make build && make build-arm64
- name: Publish
shell: bash
run: |
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
make publish-tag
make publish-tag && make publish-tag-arm64
4 changes: 4 additions & 0 deletions .github/workflows/untrusted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- uses: actions/checkout@v1
- name: Build
run: make build && make build-arm64
- name: Test
run: make test