-
Notifications
You must be signed in to change notification settings - Fork 71
30 lines (26 loc) · 965 Bytes
/
create-tag.yml
File metadata and controls
30 lines (26 loc) · 965 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# This action creates a release every second Wednesday
name: "Create and push release tag"
on:
workflow_dispatch:
inputs:
version:
description: 'Version to tag. Useful for making the first "dot" release from a rhel-x.y branch.'
required: false
default: ""
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"
version: ${{ github.event.inputs.version }}