Skip to content

Commit 0f6d8da

Browse files
authored
Merge pull request #39 from tysg/ty/setup-qemu
Build arm64 image on GitHub Actions
2 parents eb5620e + 28cca1c commit 0f6d8da

File tree

3 files changed

+28
-7
lines changed

3 files changed

+28
-7
lines changed

.github/workflows/main.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@v1
13+
- name: Set up QEMU
14+
uses: docker/setup-qemu-action@v1
1315
- name: Build
1416
env:
1517
REPO: ${{ github.repository }}
1618
shell: bash
1719
run: |
1820
echo "docker_repo=${{ env.REPO }}" >> $GITHUB_ENV
19-
make build
21+
make build && make build-arm64
2022
- name: Trivy vulnerability scanner
2123
uses: aquasecurity/[email protected]
2224
with:
@@ -26,26 +28,39 @@ jobs:
2628
ignore-unfixed: true
2729
vuln-type: 'os,library'
2830
severity: 'CRITICAL,HIGH'
31+
- name: Trivy vulnerability scanner on arm64 image
32+
uses: aquasecurity/[email protected]
33+
with:
34+
image-ref: '${{ env.docker_repo }}:latest-arm64'
35+
format: 'table'
36+
exit-code: '1'
37+
ignore-unfixed: true
38+
vuln-type: 'os,library'
39+
severity: 'CRITICAL,HIGH'
2940
test:
3041
runs-on: ubuntu-latest
3142
steps:
3243
- uses: actions/checkout@v1
44+
- name: Set up QEMU
45+
uses: docker/setup-qemu-action@v1
3346
- name: Build
3447
shell: bash
35-
run: make build
48+
run: make build && make build-arm64
3649
- name: Test
37-
run: make test
50+
run: make test
3851
publish:
3952
needs: [scan, test]
4053
if: github.repository == 'rust-serverless/lambda-rust'
4154
runs-on: ubuntu-latest
4255
steps:
4356
- uses: actions/checkout@v1
57+
- name: Set up QEMU
58+
uses: docker/setup-qemu-action@v1
4459
- name: Build
4560
shell: bash
46-
run: make build
61+
run: make build && make build-arm64
4762
- name: Publish Latest
4863
shell: bash
4964
run: |
5065
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
51-
make publish
66+
make publish && make publish-arm64

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ jobs:
2121
runs-on: ubuntu-latest
2222
steps:
2323
- uses: actions/checkout@v1
24+
- name: Set up QEMU
25+
uses: docker/setup-qemu-action@v1
2426
- name: Build
2527
shell: bash
26-
run: make build
28+
run: make build && make build-arm64
2729
- name: Publish
2830
shell: bash
2931
run: |
3032
echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin
31-
make publish-tag
33+
make publish-tag && make publish-tag-arm64

.github/workflows/untrusted.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ jobs:
99
test:
1010
runs-on: ubuntu-latest
1111
steps:
12+
- name: Set up QEMU
13+
uses: docker/setup-qemu-action@v1
1214
- uses: actions/checkout@v1
15+
- name: Build
16+
run: make build && make build-arm64
1317
- name: Test
1418
run: make test

0 commit comments

Comments
 (0)