Skip to content

Release at 5 in the morning #54

Release at 5 in the morning

Release at 5 in the morning #54

Workflow file for this run

name: Release every 2 weeks on Monday at 5 at the morning
on:
schedule:
- cron: '31 7 * * *'
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check week number
id: check_week
run: |
week_num=$(date +'%V')
declare -i wnum
wnum=$((10#${week_num}))
echo "Week number: $wnum"
if [ $((wnum % 2)) -eq 0 ]; then
echo "RUN_THIS_WEEK=true" >> $GITHUB_ENV
else
echo "RUN_THIS_WEEK=false" >> $GITHUB_ENV
fi
- name: Worked
if: env.RUN_THIS_WEEK == 'true'
run: |
echo 'Worked'
- name: Not worked
if: env.RUN_THIS_WEEK == 'false'
run: |
echo 'Not Worked'