Skip to content

Commit

Permalink
Merge pull request #846 from Felixoid/docker-action
Browse files Browse the repository at this point in the history
Manual trigger for docker images build
  • Loading branch information
Civil authored Nov 3, 2024
2 parents b8fd26f + 80e7cf9 commit 6e55637
Showing 1 changed file with 14 additions and 7 deletions.
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

0 comments on commit 6e55637

Please sign in to comment.