From be1cfec9238ec3ac82657644dfad2416d88de37d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Sch=C3=BCller?= Date: Fri, 20 Dec 2024 14:17:41 +0100 Subject: [PATCH] github/workflows/create-tag: initial version Helper to create a tag for a new release. --- .github/workflows/create-tag.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/create-tag.yml diff --git a/.github/workflows/create-tag.yml b/.github/workflows/create-tag.yml new file mode 100644 index 0000000..d985a4d --- /dev/null +++ b/.github/workflows/create-tag.yml @@ -0,0 +1,24 @@ +# This action creates a release every second Wednesday +name: "Create and push release tag" + +on: + workflow_dispatch: + schedule: + - cron: "0 8 * * 3" + +jobs: + tag-and-push: + runs-on: ubuntu-latest + + steps: + - name: Even or odd week + run: if [ `expr \`date +\%s\` / 86400 \% 2` -eq 0 ]; then echo "WEEK=odd" >> $GITHUB_ENV; else echo "WEEK=even" >> $GITHUB_ENV; fi + shell: bash + + - name: Upstream tag + uses: osbuild/release-action@create-tag + if: ${{ env.WEEK == 'odd' || github.event_name != 'schedule' }} + with: + token: "${{ secrets.SCHUTZBOT_GITHUB_ACCESS_TOKEN }}" + username: "imagebuilder-bot" + email: "imagebuilder-bots+imagebuilder-bot@redhat.com"