fix: genre badges wrap #318
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: Deployment | |
on: | |
push: | |
tags: | |
- '2.*' | |
branches: | |
- beta | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: 'actions/checkout@v3' | |
- name: Docker meta frontend | |
id: meta-frontend | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_IMAGE_FRONTEND }} | |
tags: | | |
type=ref,event=branch | |
type=semver,pattern={{version}} | |
type=raw,value=release,enable=${{ startsWith(github.ref, 'refs/tags/2.') }} | |
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/2.') }} | |
- name: Docker meta backend | |
id: meta-backend | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
${{ secrets.DOCKERHUB_USERNAME }}/${{ secrets.DOCKERHUB_IMAGE_BACKEND }} | |
tags: | | |
type=ref,event=branch | |
type=semver,pattern={{version}} | |
type=raw,value=release,enable=${{ startsWith(github.ref, 'refs/tags/2.') }} | |
type=raw,value=latest,enable=${{ startsWith(github.ref, 'refs/tags/2.') }} | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Deploy Backend | |
uses: docker/build-push-action@v3 | |
with: | |
context: '{{defaultContext}}:backend' | |
push: true | |
tags: ${{ steps.meta-backend.outputs.tags }} | |
- name: Deploy Frontend | |
uses: docker/build-push-action@v3 | |
with: | |
context: '{{defaultContext}}:frontend' | |
push: true | |
tags: ${{ steps.meta-frontend.outputs.tags }} | |
build-args: | | |
BUILD_ENV=${{ fromJSON(steps.meta-frontend.outputs.json).labels['org.opencontainers.image.version'] == 'beta' && 'beta' || 'production' }} |