Generate release versions #1145
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: Generate release versions | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: '30 11 * * *' | |
jobs: | |
generate: | |
strategy: | |
matrix: | |
teams: [ | |
{team: "transfer-digital-records", slack_secret_name: "SLACK_WEBHOOK"}, | |
{team: "digital-records-repository", slack_secret_name: "DR2_SLACK_WEBHOOK"} | |
] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Import GPG key | |
id: import_gpg | |
uses: crazy-max/ghaction-import-gpg@v4 | |
with: | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
- run: | | |
git config --global user.email 181243999+tna-da-bot@users.noreply.github.com | |
git config --global user.name tna-da-bot | |
cd release-versions | |
pip install -r requirements.txt | |
python generate_release_file.py ${{ matrix.teams.team }} | |
cd .. | |
env: | |
GITHUB_API_TOKEN: ${{ secrets.WORKFLOW_PAT }} | |
SLACK_URL: ${{ secrets[matrix.teams.slack_secret_name] }} | |
- uses: actions/checkout@v3 | |
with: | |
ref: scripts-pages | |
token: ${{ secrets.WORKFLOW_PAT }} | |
path: scripts-pages | |
- run: | | |
cd scripts-pages | |
mkdir -p docs/${{ matrix.teams.team }} | |
cp ../release-versions/${{ matrix.teams.team }}/output.html docs/${{ matrix.teams.team }}/ | |
git add docs | |
git commit -m "Add release versions" || true | |
git push |