Skip to content

Lock file maintenance (#394) #61

Lock file maintenance (#394)

Lock file maintenance (#394) #61

Workflow file for this run

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@v3
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Docker Metadata
id: meta
uses: docker/metadata-action@v4
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@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
push: ${{ github.ref == 'refs/heads/production' }}
tags: ${{ steps.meta.outputs.tags }}