Skip to content

Commit

Permalink
Adds docker v prefix (ex: v13.0.1) (#609)
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups authored Mar 20, 2023
1 parent 881b36d commit 1f39274
Showing 1 changed file with 6 additions and 49 deletions.
55 changes: 6 additions & 49 deletions .github/workflows/push-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,20 @@
#
# On every new `vX.Y.Z` tag the following images are pushed:
#
# cosmoscontracts/juno:vX.Y.Z # is pushed
# cosmoscontracts/juno:X.Y.Z # is pushed
# cosmoscontracts/juno:X.Y # is updated to X.Y.Z
# cosmoscontracts/juno:X # is updated to X.Y.Z
# cosmoscontracts/juno:latest # is updated to X.Y.Z
#
# cosmoscontracts/juno-e2e:vX.Y.Z # is pushed
# cosmoscontracts/juno-e2e:X.Y.Z # is pushed
# cosmoscontracts/juno-e2e:X.Y # is updated to X.Y.Z
# cosmoscontracts/juno-e2e:X # is updated to X.Y.Z
# cosmoscontracts/juno-e2e:latest # is updated to X.Y.Z
#
# On every new `vX.Y.0` tag the following images are pushed:
#
# cosmoscontracts/juno-e2e-init-chain:X.Y.0 # is pushed
# cosmoscontracts/juno-e2e-init-chain:X.Y # is updated to X.Y.0
# cosmoscontracts/juno-e2e-init-chain:X # is updated to X.Y.0
# All the images above have support for linux/amd64 and linux/arm64.
#
# Due to QEMU virtualization used to build multi-platform docker images
Expand All @@ -30,6 +29,7 @@ on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # ignore rc

jobs:
juno-images:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -74,6 +74,8 @@ jobs:
ghcr.io/cosmoscontracts/juno:${{ env.MAJOR_VERSION }}
ghcr.io/cosmoscontracts/juno:${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}
ghcr.io/cosmoscontracts/juno:${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}.${{ env.PATCH_VERSION }}
ghcr.io/cosmoscontracts/juno:v${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}.${{ env.PATCH_VERSION }}
juno-e2e-images:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -117,49 +119,4 @@ jobs:
ghcr.io/cosmoscontracts/juno-e2e:${{ env.MAJOR_VERSION }}
ghcr.io/cosmoscontracts/juno-e2e:${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}
ghcr.io/cosmoscontracts/juno-e2e:${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}.${{ env.PATCH_VERSION }}
e2e-init-chain-images:
if: startsWith(github.ref, 'refs/tags/v') && endsWith(github.ref, '.0')
runs-on: ubuntu-latest
steps:
-
name: Check out the repo
uses: actions/checkout@v3
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Parse tag
id: tag
run: |
VERSION=$(echo ${{ github.ref_name }} | sed "s/v//")
MAJOR_VERSION=$(echo $VERSION | cut -d '.' -f 1)
MINOR_VERSION=$(echo $VERSION | cut -d '.' -f 2)
PATCH_VERSION=$(echo $VERSION | cut -d '.' -f 3)
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "MAJOR_VERSION=$MAJOR_VERSION" >> $GITHUB_ENV
echo "MINOR_VERSION=$MINOR_VERSION" >> $GITHUB_ENV
echo "PATCH_VERSION=$PATCH_VERSION" >> $GITHUB_ENV
-
name: Build and push
id: build_push_e2e_init_image
uses: docker/build-push-action@v4
with:
file: tests/e2e/initialization/init.Dockerfile
context: .
push: true
platforms: linux/amd64,linux/arm64
build-args: |
E2E_SCRIPT_NAME=chain
tags: |
ghcr.io/cosmoscontracts/juno-e2e-init-chain:${{ env.MAJOR_VERSION }}
ghcr.io/cosmoscontracts/juno-e2e-init-chain:${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}
ghcr.io/cosmoscontracts/juno-e2e-init-chain:${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}.${{ env.PATCH_VERSION }}
ghcr.io/cosmoscontracts/juno-e2e:v${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}.${{ env.PATCH_VERSION }}

0 comments on commit 1f39274

Please sign in to comment.