Skip to content

Commit

Permalink
Add build job for proof explorer.
Browse files Browse the repository at this point in the history
  • Loading branch information
abizjak committed Mar 25, 2024
1 parent b92578e commit 2360d64
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/release-proof-explorer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# This job builds and publishes a docker image for the test issuer frontend to
# the dockerhub image repository.
name: Create and publish a Docker image for the issuer frontend.

on:
workflow_dispatch: # allows manual trigger

push:
tags:
- 'proof-explorer/*.*.*'

env:
REGISTRY: docker.io
IMAGE_NAME: proof-explorer

jobs:
build-and-push-image:
runs-on: ubuntu-latest
environment: testnet-builds
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
# Uses the `docker/login-action` action to log in to the Container registry.
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract tag from package.json
id: meta
run: |
export VERSION=$(jq -r .version test-tools/proof-explorer/package.json)
export FULL_IMAGE_TAG="${{ env.REGISTRY }}/concordium/$IMAGE_NAME:$VERSION"
echo "::notice FULL_IMAGE_TAG=${FULL_IMAGE_TAG}"
# Make sure the image does not exist. Abort if we can retrieve any metadata.
if docker manifest inspect ${FULL_IMAGE_TAG} > /dev/null; then
echo "::error ${FULL_IMAGE_TAG} already exists"
exit 1
else
# Store the full image tag into a tag variable for the following step.
echo "tag=${FULL_IMAGE_TAG}" > "$GITHUB_OUTPUT"
fi
- name: Build and push Docker image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
file: ./test-tools/proof-explorer/Dockerfile
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tag }}

0 comments on commit 2360d64

Please sign in to comment.