Skip to content

Commit

Permalink
add arm64 to docker publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nullpointer0x00 committed Oct 17, 2023
1 parent df2d286 commit 2105d31
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Docker Build and Push
# Build & Push builds the simapp docker image on every push to master
# and pushes the image to https://hub.docker.com/u/provenanceio

on:
push:
branches:
Expand All @@ -9,11 +8,6 @@ on:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
- "v[0-9]+.[0-9]+.[0-9]+-rc*" # Push events to matching v*, i.e. v1.0-rc1, v20.15.10-rc5

# Set concurrency for this workflow to cancel in-progress jobs if retriggered.
# The github.ref is only available when triggered by a PR so fall back to github.run_id for other cases.
# The github.run_id is unique for each run, giving each such invocation it's own unique concurrency group.
# Basically, if you push to a PR branch, jobs that are still running for that PR will be cancelled.
# But jobs started because of a merge to main or a release tag push are not cancelled.
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
Expand All @@ -25,13 +19,16 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Go mod vendor
run: |
go mod vendor
- name: Prepare
id: prep
run: |
Expand All @@ -56,24 +53,28 @@ jobs:
created="$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
echo "Setting output: created=$created"
echo "created=$created" >> "$GITHUB_OUTPUT"
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3

- name: Available platforms
run: echo ${{ steps.buildx.outputs.platforms }}

- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Publish to Docker Hub
uses: docker/build-push-action@v5
with:
context: .
target: run
build-args: |
VERSION=${{ steps.prep.outputs.version }}
platforms: linux/amd64
platforms: linux/amd64,linux/arm64
file: docker/blockchain/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.prep.outputs.tags }}

0 comments on commit 2105d31

Please sign in to comment.