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

feat(release): create Docker hub binaries when tagging #5138

Merged
merged 13 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from 5 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
7 changes: 7 additions & 0 deletions .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ jobs:
password: ${{ steps.auth.outputs.access_token }}
logout: false

- name: Login to DockerHub
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: docker/login-action@v2.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# Build and push image to Google Artifact Registry
- name: Build & push
id: docker_build
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/release-binaries.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow is meant to trigger a build of Docker binaries when a tag
# is created, it uses the existing `build-docker-image.yml` workflow
#
# We use a separate action as we might want to trigger this with different under
# different circumstances than a Continous Deployment, for example.
name: Release binaries

on:
create:

jobs:
# Each time this workflow is executed, a build will be triggered to create a new image
# with the corresponding tags using information from git
#
# The image will be commonly named `zebrad:<short-hash | github-ref | semver>`
build:
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: ./.github/workflows/build-docker-image.yml
with:
dockerfile_path: ./docker/Dockerfile
dockerfile_target: runtime
image_name: zebrad
network: Mainnet
# TODO: validate this are the values we want on a public image
checkpoint_sync: true
rust_backtrace: '1'
zebra_skip_ipv6_tests: '1'
rust_log: info
# This step needs access to Docker Hub secrets to run succesfully
secrets: inherit