-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
.github/workflows: add create-tag workflow
- Loading branch information
1 parent
fff8128
commit 17f2d11
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: "[email protected]" |