Skip to content

v1.5.0

v1.5.0 #9

Workflow file for this run

# This workflow pushes new white-whale-frontend docker images on every new tag.
#
# On every new `vX.Y.Z` tag the following images are pushed:
#
# White-Whale-Defi-Platform/white-whale-frontend:X.Y.Z # is pushed
# White-Whale-Defi-Platform/white-whale-frontend:X.Y # is updated to X.Y.Z
# White-Whale-Defi-Platform/white-whale-frontend:X # is updated to X.Y.Z
# White-Whale-Defi-Platform/white-whale-frontend:latest # is updated to X.Y.Z
# All the images above have support for linux/amd64 and linux/arm64.
#
# Due to QEMU virtualization used to build multi-platform docker images
# this workflow might take a while to complete.
# Notice on building the frontend into images
# There might be a wonder 'why?' would we want to do this when someone can just clone the repo or head to our deployment links
# Having a public image made and published for our frontend is a crucial step that enables a user to deploy the frontend on their own using any cloud provider of their choice. Including Akash ;-)
# If you want to learn more about Akash frontend deployments give me a DM, I am learning more all the time.
name: Push Docker Images
on:
release:
types: [published, created, edited]
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+' # ignore rc
jobs:
migaloo-chain-images:
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
# See https://docs.github.com/en/actions/learn-github-actions/contexts#github-context for more info
username: ${{ github.repository_owner }}
# This token is provided by Actions, you do not need to create your own token
# See https://docs.github.com/en/actions/learn-github-actions/contexts#secrets-context for more info
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_image
uses: docker/build-push-action@v4
with:
file: Dockerfile
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/white-whale-defi-platform/white-whale-frontend:${{ env.MAJOR_VERSION }}
ghcr.io/white-whale-defi-platform/white-whale-frontend:${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}
ghcr.io/white-whale-defi-platform/white-whale-frontend:${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}.${{ env.PATCH_VERSION }}