Rol @types/node back to v16 #79
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 and Push Docker Image | |
on: | |
push: | |
branches: | |
- main | |
- production | |
- dev | |
jobs: | |
docker-build-push: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Docker Metadata | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: api3/dao-dashboard | |
tags: | | |
# set latest tag for production branch | |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'production') }} | |
type=sha,prefix=,suffix=,format=long | |
- name: Login to Docker Hub | |
if: ${{ github.ref == 'refs/heads/production' }} | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
build-args: | | |
REACT_APP_MAINNET_PROVIDER_URL=${{ secrets.REACT_APP_MAINNET_PROVIDER_URL }} | |
push: ${{ github.ref == 'refs/heads/production' }} | |
tags: ${{ steps.meta.outputs.tags }} |