From 702b5f03dd269d999979d9716f423b3b419dc710 Mon Sep 17 00:00:00 2001 From: till Date: Thu, 22 Feb 2024 19:29:19 +0100 Subject: [PATCH] Chore(ci): workflow to rebuild docker images --- .github/workflows/build.yml | 2 +- .github/workflows/rebuild.yml | 37 +++++++++++++++++++++++++++++++ .github/workflows/update-hugo.yml | 2 +- 3 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/rebuild.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7c6d5d8..1a5b926 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: Build Docker Image +name: build on: pull_request: diff --git a/.github/workflows/rebuild.yml b/.github/workflows/rebuild.yml new file mode 100644 index 0000000..49be6b6 --- /dev/null +++ b/.github/workflows/rebuild.yml @@ -0,0 +1,37 @@ +name: rebuild + +on: + workflow_dispatch: + inputs: + hugo-version: + required: true + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: refs/tags/${{ inputs.hugo-version }} + - uses: docker/setup-buildx-action@v3 + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - id: meta + uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 + with: + images: ghcr.io/${{ github.repository }} + tags: type=semver,pattern={{raw}},value=${{ inputs.hugo-version }} + - uses: docker/build-push-action@v5 + with: + build-args: ${{ inputs.hugo-version }} + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/update-hugo.yml b/.github/workflows/update-hugo.yml index 92b1a70..0514845 100644 --- a/.github/workflows/update-hugo.yml +++ b/.github/workflows/update-hugo.yml @@ -1,4 +1,4 @@ -name: update-hugo +name: update on: workflow_dispatch: