From 6a6f5f207dd4102c8ed72273f53c9668ffd8ff34 Mon Sep 17 00:00:00 2001 From: Mainak Kundu Date: Thu, 4 Aug 2022 19:47:47 +0530 Subject: [PATCH] Add CI job to tag iteration ends --- .github/workflows/tag-iteration-ends.yml | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/tag-iteration-ends.yml diff --git a/.github/workflows/tag-iteration-ends.yml b/.github/workflows/tag-iteration-ends.yml new file mode 100644 index 00000000000..eb013bc4a7d --- /dev/null +++ b/.github/workflows/tag-iteration-ends.yml @@ -0,0 +1,25 @@ +name: Tag Iteration Ends + +on: + schedule: # 0400 UTC next day (end of US day) + - cron: '0 4 6 8 *' + - cron: '0 4 27 8 *' + - cron: '0 4 17 9 *' + - cron: '0 4 8 10 *' + - cron: '0 4 5 11 *' + - cron: '0 4 3 12 *' + workflow_dispatch: + +jobs: + tag: + name: tag-iteration-ends + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Get last date of iteration + id: date + run: echo "::set-output name=date::$(date -u --date yesterday +'%m%d')" + - name: Create tag + run: | + git tag ${{ format('date-{0}', steps.date.outputs.date) }} + git push origin ${{ format('date-{0}', steps.date.outputs.date) }}