Skip to content

V0.3.0 rc.2

V0.3.0 rc.2 #102

Workflow file for this run

name: Docker Workflow
on:
workflow_dispatch:
push:
branches:
- 'master'
tags: ['v*.*.*']
pull_request:
branches:
- 'master'
workflow_call:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
push:
name: Build & Push Docker Image
runs-on: ubuntu-latest
if: github.event_name == 'push' || (github.event_name == 'workflow_call' && github.event.inputs.trigger == 'build')
permissions:
contents: read
packages: write
steps:
- name: Repository Checkout
uses: actions/checkout@v4
-
name: Extract Git Metadata
id: meta
uses: docker/metadata-action@v5
with:
#images: cyclefive/cracktunes
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
-
name: Registry Login
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build & Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
# push: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/') }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}