0.7.0 #5
Workflow file for this run
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: Registry | |
# Put 'on' in quotes to avoid YAML parsing error | |
"on": | |
# Run on new releases | |
release: | |
types: | |
- published | |
jobs: | |
registry: | |
name: Publish Docker image to GitHub registry | |
# Pin version of Ubuntu to avoid breaking changes | |
runs-on: ubuntu-22.04 | |
# Use reasonable timeout to avoid stuck workflows | |
timeout-minutes: 30 | |
permissions: | |
# Needed to checkout code | |
contents: read | |
# Needed to push to registry | |
packages: write | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Set up Docker Buildx | |
uses: docker/[email protected] | |
- name: Log in to the Container registry | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/[email protected] | |
with: | |
context: ./ | |
push: true | |
# Slashes are here to make the string multiline and avoid using spaces | |
tags: "\ | |
ghcr.io/radio-aktywne/apps/fusion\ | |
:latest,\ | |
ghcr.io/radio-aktywne/apps/fusion\ | |
:${{ github.event.release.tag_name }}" | |
# Cache Docker layers between builds | |
cache-from: type=gha,scope=${{ github.workflow }} | |
cache-to: type=gha,mode=max,scope=${{ github.workflow }} |