Skip to content

Commit

Permalink
ci: Update Docker build workflows (backport #59) (#62)
Browse files Browse the repository at this point in the history
* ci: Update Docker build workflows (#59)

Signed-off-by: Thane Thomson <[email protected]>

Signed-off-by: Thane Thomson <[email protected]>
(cherry picked from commit ddd0117)

# Conflicts:
#	.github/workflows/tendermint-docker.yml

* Resolve conflicts

Signed-off-by: Thane Thomson <[email protected]>

Signed-off-by: Thane Thomson <[email protected]>
Co-authored-by: Thane Thomson <[email protected]>
  • Loading branch information
mergify[bot] and thanethomson authored Jan 4, 2023
1 parent aa8ab29 commit 5a2776b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/tendermint-docker.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name: Build & Push
# Build & Push rebuilds the tendermint docker image on every push to master and creation of tags
# and pushes the image to https://hub.docker.com/r/interchainio/simapp/tags
name: Docker
# Build & Push rebuilds the Tendermint docker image on every push to main and creation of tags
# and pushes the image to https://hub.docker.com/r/cometbft/tendermint
on:
pull_request:
push:
branches:
- master
- main
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
- "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]+-alpha.[0-9]+" # e.g. v0.37.0-alpha.1, v0.38.0-alpha.10
- "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

jobs:
build:
Expand All @@ -18,7 +19,7 @@ jobs:
- name: Prepare
id: prep
run: |
DOCKER_IMAGE=tendermint/tendermint
DOCKER_IMAGE=cometbft/tendermint
VERSION=noop
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
Expand All @@ -32,25 +33,25 @@ jobs:
if [[ $VERSION =~ ^v[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
TAGS="$TAGS,${DOCKER_IMAGE}:${VERSION}"
fi
echo ::set-output name=tags::${TAGS}
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set up Docker Build
uses: docker/setup-buildx-action@v2.2.1

- name: Login to DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v2
uses: docker/login-action@v2.1.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Publish to Docker Hub
uses: docker/build-push-action@v3
uses: docker/build-push-action@v3.2.0
with:
context: .
file: ./DOCKER/Dockerfile
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/testapp-docker.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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
# and pushes the image to https://hub.docker.com/r/cometbft/e2e-node
on:
push:
branches:
Expand All @@ -19,7 +19,7 @@ jobs:
- name: Prepare
id: prep
run: |
DOCKER_IMAGE=tendermint/e2e-node
DOCKER_IMAGE=cometbft/e2e-node
VERSION=noop
if [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION=${GITHUB_REF#refs/tags/}
Expand Down

0 comments on commit 5a2776b

Please sign in to comment.