forked from tendermint/tendermint
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build docker images that include the test app and push to GHCR (#15)
- Loading branch information
Showing
1 changed file
with
14 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ name: Docker E2E Node | |
# Build & Push rebuilds the e2e Testapp docker image on every push to main and creation of tags | ||
# and pushes the image to https://hub.docker.com/r/tendermint/e2e-node | ||
on: | ||
# Allow manual image builds | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
@@ -11,6 +13,9 @@ on: | |
- "v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+" # e.g. v0.37.0-beta.1, v0.38.0-beta.10 | ||
- "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+" # e.g. v0.37.0-rc1, v0.38.0-rc10 | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
@@ -19,7 +24,7 @@ jobs: | |
- name: Prepare | ||
id: prep | ||
run: | | ||
DOCKER_IMAGE=tendermint/e2e-node | ||
DOCKER_IMAGE="${{ env.REGISTRY }}/informalsystems/tendermint-e2e-node" | ||
VERSION=noop | ||
if [[ $GITHUB_REF == refs/tags/* ]]; then | ||
VERSION=${GITHUB_REF#refs/tags/} | ||
|
@@ -40,17 +45,18 @@ jobs: | |
with: | ||
platforms: all | ||
|
||
- name: Set up Docker Build | ||
uses: docker/setup-buildx-action@v2.2.1 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Login to DockerHub | ||
- name: Login to GHCR | ||
if: ${{ github.event_name != 'pull_request' }} | ||
uses: docker/login-action@v2.1.0 | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
registry: ${{ env.REGISTRY }} | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Publish to Docker Hub | ||
- name: Publish image | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
|