Skip to content

Commit

Permalink
Enable and set up Docker Buildx for multi-platform builds
Browse files Browse the repository at this point in the history
Also add caching of Go modules
  • Loading branch information
ocean committed Mar 25, 2021
1 parent 9b99a4c commit c310df0
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,35 @@ jobs:
release:
name: Release
runs-on: ubuntu-18.04 # 20.04 doesn't provide createrepo for now
env:
DOCKER_CLI_EXPERIMENTAL: "enabled"
steps:
- name: Install dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install rpm reprepro createrepo distro-info
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Show available Docker Buildx platforms
run: echo ${{ steps.buildx.outputs.platforms }}
- name: Setup Go
uses: actions/setup-go@v1
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache Go modules
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# - name: Checkout trivy-repo
# uses: actions/checkout@v2
# with:
Expand Down

0 comments on commit c310df0

Please sign in to comment.