Bump dompurify from 3.0.11 to 3.1.6 in /documentation #213
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |