Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manual trigger for docker images build #846

Merged
merged 4 commits into from
Nov 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions .github/workflows/docker-ghcrio.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
name: Upload Docker images to ghcr.io
on:
release:
types: [published, edited]
types: [published]
workflow_dispatch:
inputs:
ref:
description: 'Git tag to push the image'
required: true
type: string
jobs:
docker:
name: Build image
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
context: ${{ inputs.ref && 'git' || 'workflow' }}
images: ghcr.io/${{ github.repository }}
# create latest tag for branch events
flavor: |
latest=auto
latest=${{ inputs.ref && 'false' || 'auto' }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}.{{minor}}.{{patch}}
type=semver,pattern={{version}},value=${{inputs.ref}}
type=semver,pattern={{major}}.{{minor}},value=${{inputs.ref}}
type=semver,pattern={{major}}.{{minor}}.{{patch}},value=${{inputs.ref}}
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
Expand Down
Loading