Release #10
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: Release | |
on: | |
push: | |
tags: | |
- v* | |
workflow_dispatch: | |
jobs: | |
debian: | |
name: Publish Debian Image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# https://github.com/docker/metadata-action | |
# Tags: | |
# type=semver,pattern=...: on tag pushed, with a valid `semver`, the new image | |
# will have tags `x`, `x.y`, `x.y.z`. Pre-release GIT tag will tag image | |
# with only pre-release tag, e.g. `x.y.z-beta.67`, and not the others | |
# Flavor: | |
# `latest` will tag the image with `latest` | |
- name: Extract GIT metadata for Docker | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: | | |
ghcr.io/${{ github.repository_owner }}/invenio-rdm-starter | |
tags: | | |
# type=semver,pattern={{major}} | |
# type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}}.{{minor}}.{{patch}} | |
# type=semver,pattern={{version}} | |
flavor: | | |
latest=true | |
# needed to build multi-platform images | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to GitHub Container Registry | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish Image to GitHub Container Registry | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: ./Dockerfile | |
# support images for Intel and Apple Silicon processors | |
platforms: linux/amd64, linux/arm64 | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} |