Make workflow runs dispatchable manually

This commit is contained in:
Timur Demin 2021-10-03 11:21:38 +05:00
parent bc7e8b6858
commit 7da783e853
No known key found for this signature in database
GPG key ID: 9EDF3F9D9286FA20
3 changed files with 36 additions and 0 deletions

34
.github/workflows/docker-manual.yml vendored Normal file
View file

@ -0,0 +1,34 @@
name: Push to GHCR (Manual)
on:
workflow_dispatch:
inputs:
tag:
required: true
description: "Build specific tag"
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.tag }}
- name: Set up Buildx
uses: docker/setup-buildx-action@v1
- name: Login to registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build & push
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:${{ github.event.inputs.tag }}

View file

@ -4,6 +4,7 @@ on:
push:
tags:
- '*'
workflow_dispatch:
jobs:
goreleaser:

View file

@ -2,6 +2,7 @@ name: Run tests
on:
pull_request:
workflow_dispatch:
jobs:
lint: