Skip to content

About widget improvements + HQ Map updates #107

About widget improvements + HQ Map updates

About widget improvements + HQ Map updates #107

Workflow file for this run

name: build image
on:
pull_request:
push:
branches:
- master
tags:
- v*
- stg-v*
env:
IMAGE_NAME: paritytech/polkadot-hub-app
jobs:
build_only:
name: Build Docker image
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: false
build-args: |
VCS_REF="${{ github.sha }}"
BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')"
tags: |
${{ env.IMAGE_NAME }}:${{ github.sha }}
${{ env.IMAGE_NAME }}:latest
build_and_push:
name: Build Docker image and push it to Docker Hub
if: ${{ github.ref == 'refs/heads/master' || github.ref_type == 'tag' }}
runs-on: ubuntu-latest
environment: master_and_tags
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Prepare Docker environment
run: |
echo IMAGE_TAG=$(if [ "$GITHUB_REF" == "refs/heads/master" ]; then echo "master-${GITHUB_SHA::7}"; else echo "$GITHUB_REF_NAME"; fi) >> $GITHUB_ENV
echo $IMAGE_TAG
echo "Docker image will be published with the tag: ${{ env.IMAGE_TAG }}!"
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PASS }}
- name: Build and push Docker image from master
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile
push: true
build-args: |
VCS_REF="${{ github.sha }}"
BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')"
tags: |
${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
${{ env.IMAGE_NAME }}:latest