Skip to content

Fix image and tag name #8

Fix image and tag name

Fix image and tag name #8

Workflow file for this run

---
name: Build Docker images
on:
push:
tags:
- "v*"
jobs:
test:
uses: ./.github/workflows/test.yml
dockerize:
runs-on: ubuntu-latest
needs: [test]
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Checkout codebase
uses: actions/checkout@v3
- name: Login to registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set Docker metadata for app
id: meta-app
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern=v{{version}}-app
type=semver,pattern=v{{major}}.{{minor}}-app
- name: Set Docker metadata for calibre
id: meta-calibre
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=semver,pattern=v{{version}}-calibre
type=semver,pattern=v{{major}}.{{minor}}-calibre
- name: Build and push app
uses: docker/build-push-action@v4
with:
context: .
file: docker/Dockerfile
push: true
target: app
tags: ${{ steps.meta-app.outputs.tags }}
- name: Build and push app
uses: docker/build-push-action@v4
with:
context: .
file: docker/Dockerfile
push: true
target: calibre
tags: ${{ steps.meta-calibre.outputs.tags }}