From b7363ac49881bd07ec2691f2a07ebd1633e695a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Molinero=20Fern=C3=A1ndez?= Date: Thu, 10 Feb 2022 20:00:10 +0100 Subject: [PATCH] Added workflow to rebuild the latest release --- .../trigger-rebuild-latest-release.yml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/trigger-rebuild-latest-release.yml diff --git a/.github/workflows/trigger-rebuild-latest-release.yml b/.github/workflows/trigger-rebuild-latest-release.yml new file mode 100644 index 0000000..7538b26 --- /dev/null +++ b/.github/workflows/trigger-rebuild-latest-release.yml @@ -0,0 +1,26 @@ +name: 'Trigger rebuild of latest release' + +on: + schedule: + - cron: '20 04 * * 1' + workflow_dispatch: + +jobs: + + trigger-rebuild: + name: 'Trigger rebuild' + runs-on: 'ubuntu-latest' + steps: + - name: 'REST API call' + run: | + curl -fsS --proto '=https' --tlsv1.3 \ + --url 'https://api.github.com/repos/${{ github.repository }}/actions/workflows/ci.yml/dispatches' \ + --header 'Authorization: Bearer ${{ secrets.PERSONAL_GITHUB_TOKEN }}' \ + --header 'Accept: application/vnd.github.v3+json' \ + --header 'Content-Type: application/json' \ + --data "$(curl -fsS --proto '=https' --tlsv1.3 \ + --url 'https://api.github.com/repos/${{ github.repository }}/releases/latest' \ + --header 'Authorization: Bearer ${{ secrets.PERSONAL_GITHUB_TOKEN }}' \ + --header 'Accept: application/vnd.github.v3+json' \ + --header 'Content-Type: application/json' \ + | jq -rc '{ ref: .tag_name }')"