Weekly tag #103
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: Weekly tag | |
# run every Sunday at 00:15 UTC | |
on: | |
schedule: | |
- cron: "15 0 * * 0" | |
jobs: | |
create-tag: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Create Tag | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
let output = ''; | |
const options = {}; | |
options.listeners = { | |
stdout: (data) => { | |
output += data.toString(); | |
} | |
}; | |
await exec.exec('date', ['+snapshot-%Gwk%V'], options); | |
const date = output.trim() | |
github.rest.git.createRef({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
ref: `refs/tags/${date}`, | |
sha: context.sha | |
}) |