From 7da783e8536c0a4b21427f9d3d0f4134e30b7907 Mon Sep 17 00:00:00 2001 From: Timur Demin Date: Sun, 3 Oct 2021 11:21:38 +0500 Subject: [PATCH] Make workflow runs dispatchable manually --- .github/workflows/docker-manual.yml | 34 +++++++++++++++++++++++++++++ .github/workflows/goreleaser.yml | 1 + .github/workflows/tests.yml | 1 + 3 files changed, 36 insertions(+) create mode 100644 .github/workflows/docker-manual.yml diff --git a/.github/workflows/docker-manual.yml b/.github/workflows/docker-manual.yml new file mode 100644 index 0000000..84bb51f --- /dev/null +++ b/.github/workflows/docker-manual.yml @@ -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 }} diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml index 1fa948b..a94c31c 100644 --- a/.github/workflows/goreleaser.yml +++ b/.github/workflows/goreleaser.yml @@ -4,6 +4,7 @@ on: push: tags: - '*' + workflow_dispatch: jobs: goreleaser: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index df054b3..f19d8f5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,6 +2,7 @@ name: Run tests on: pull_request: + workflow_dispatch: jobs: lint: