Skip to content

Commit

Permalink
Build docker images that include the test app and push to GHCR (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
lasarojc authored Feb 15, 2023
1 parent 1ac25a8 commit f95d18a
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/testapp-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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/}
Expand All @@ -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: .
Expand Down

0 comments on commit f95d18a

Please sign in to comment.