From a493a682cfb067910b1eb6d6bb8ca542198f271d Mon Sep 17 00:00:00 2001 From: Benoit Blanchon Date: Fri, 10 Apr 2020 10:45:17 +0200 Subject: [PATCH] Add GitHub action to add a tag every Monday --- .github/workflows/tag.yml | 19 +++++++++++++++++++ tag_with_latest.sh | 10 ---------- 2 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/tag.yml delete mode 100755 tag_with_latest.sh diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml new file mode 100644 index 00000000..8001a7b4 --- /dev/null +++ b/.github/workflows/tag.yml @@ -0,0 +1,19 @@ +name: Tag with Chromium version + +on: + schedule: + - cron: '0 6 * * 1' + +jobs: + add_tag: + runs-on: ubuntu-latest + steps: + - name: Get Chromium branch + id: chromium + shell: bash + run: echo "::set-output name=branch::$(git ls-remote --heads https://pdfium.googlesource.com/pdfium.git | grep -ohP 'chromium/\d+' | tail -n1)" + - name: Add tag + uses: tvdias/github-tagger@v0.0.1 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + tag: ${{ steps.chromium.outputs.branch }} \ No newline at end of file diff --git a/tag_with_latest.sh b/tag_with_latest.sh deleted file mode 100755 index 3ace8004..00000000 --- a/tag_with_latest.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash - -set -eu - -cd $(dirname "$0") - -TAGNAME=$(git ls-remote --heads https://pdfium.googlesource.com/pdfium.git | grep -ohP 'chromium/\d+' | tail -n1) -git pull -git tag "$TAGNAME" -git push origin "$TAGNAME"