nightly #1303
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
name: nightly | |
on: | |
schedule: | |
- cron: '42 22 * * *' | |
# Triggers the nightly builds by tagging master branch | |
# We have to use a dedicated access token because events raised by workflows | |
# using GITHUB_TOKEN do not trigger other workflows: | |
# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows#about-workflow-events | |
# To create the token, see: | |
# https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token | |
# And then to create the secret containing it, see: | |
# https://docs.github.com/en/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository | |
# Unfortunately, there's no way to limit the access token to a single repository | |
# or to just be allowed to tag, so this solution is not great. | |
jobs: | |
tag: | |
# Only trigger the nightly on the main repository. Forks probably don't want | |
# to run the nightly by default. | |
if: github.repository == 'leuat/TRSE' | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- uses: dev-drprasad/delete-tag-and-release@v1.0 | |
with: | |
delete_release: false | |
tag_name: "nightly" | |
env: | |
GITHUB_TOKEN: ${{ secrets.NIGHTLY_TOKEN }} | |
- uses: tvdias/github-tagger@v0.0.1 | |
with: | |
repo-token: "${{ secrets.NIGHTLY_TOKEN }}" | |
tag: "nightly" |