Nightly Jobs #46
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
# Copyright (c) 2024 RapidStream Design Automation, Inc. and contributors. | |
# All rights reserved. The contributor(s) of this file has/have agreed to the | |
# RapidStream Contributor License Agreement. | |
name: Nightly Jobs | |
on: | |
schedule: | |
- cron: "8 9 * * *" # 09:08 UTC / 23:08 UTC-10 / 02:08 PDT / 01:08 PST | |
workflow_dispatch: | |
jobs: | |
bump-version: | |
name: Bump Version | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout myself | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Fetch all history for all branches and tags. | |
token: ${{ secrets.GH_PUSH_PAT }} # Push with PAT to trigger CI. | |
- name: Bump version | |
id: bump-version | |
run: | | |
# https://github.com/actions/checkout/tree/d632683dd7b4114ad314bca15554477dd762a938?tab=readme-ov-file#push-a-commit-using-the-built-in-token | |
git config user.name "github-actions[bot]" | |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
.github/scripts/bump-version.sh | |
if git diff --quiet "${GITHUB_SHA}"; then | |
echo "is-updated=false" >>"${GITHUB_OUTPUT}" | |
else | |
git push --force origin HEAD:ci/next | |
echo "is-updated=true" >>"${GITHUB_OUTPUT}" | |
fi | |
env: | |
# Using UTC-10 to generate date so the new version includes all | |
# commits from that date for most US timezones. | |
TZ: Pacific/Honolulu |