Skip to content
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

Add arm64 to docker publish workflow #1709

Merged
merged 19 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from 9 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
13 changes: 10 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ on:
push:
branches:
- main
- nullpointer0x00/1634-arm64-container-builds
tags:
- "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.
Expand All @@ -17,21 +18,23 @@ on:
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true

jobs:
docker:
runs-on: ubuntu-latest
steps:
- 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 +59,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
iramiller marked this conversation as resolved.
Show resolved Hide resolved
file: docker/blockchain/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.prep.outputs.tags }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* Bump cometbft to v0.34.29 (from v0.34.28) [PR 1649](https://github.com/provenance-io/provenance/pull/1649).
* Add genesis/init for Marker module send deny list addresses. [#1660](https://github.com/provenance-io/provenance/issues/1660)
* Add automatic changelog entries for dependabot. [#1674](https://github.com/provenance-io/provenance/issues/1674)
* Add publishing of docker arm64 container builds [#1634](https://github.com/provenance-io/provenance/issues/1634)
* Ensure IBC marker has matching supply [#1706](https://github.com/provenance-io/provenance/issues/1706).
### Bug Fixes

Expand Down
7 changes: 5 additions & 2 deletions docker/blockchain/Dockerfile
Taztingo marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ COPY Makefile sims.mk ./


# Build and install provenanced
ENV VERSION=$VERSION
RUN make VERSION=${VERSION} WITH_CLEVELDB=true install
ENV VERSION=${VERSION}
RUN UNAME_M=$(uname -m) && \
echo "UNAME_M: ${UNAME_M}" && \
export ARCH=${UNAME_M} && \
make VERSION=${VERSION} WITH_CLEVELDB=true install

Taztingo marked this conversation as resolved.
Show resolved Hide resolved
###
FROM debian:bullseye-slim as run
Expand Down