Skip to content

Merge pull request #126 from evanofslack/ratio #18

Merge pull request #126 from evanofslack/ratio

Merge pull request #126 from evanofslack/ratio #18

Workflow file for this run

name: publish-web
on:
workflow_dispatch:
push:
branches:
- "main"
tags:
- "v*"
paths:
- "web/**"
env:
REGISTRY: docker.io
IMAGE_NAME: ${{ github.repository }}-web
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=ref,event=branch
type=ref,event=pr
type=sha
- name: login to docker hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: set up docker buildx
uses: docker/setup-buildx-action@v2
- name: build and push
uses: docker/build-push-action@v4
with:
context: "{{defaultContext}}:web"
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
AUTH_USERNAME=${{ secrets.AUTH_USERNAME }}
AUTH_PASSWORD=${{ secrets.AUTH_PASSWORD }}