Skip to content

Commit ce1ae98

Browse files
committed
update documentation
1 parent 38fc83e commit ce1ae98

File tree

2 files changed

+20
-21
lines changed

2 files changed

+20
-21
lines changed

.github/workflows/upgrade-check.yml.sample

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,26 @@
22
# stackhpc/ansible-slurm-appliance repository to check whether there is a new upstream version available. If a
33
# newer tag is found in the upstream repository then a pull request is created to the downstream repo
44
# in order to merge in the changes from the new upstream release.
5-
5+
#
66
# To use this workflow in a downstream ansible-slurm-appliance repository simply copy it into .github/workflows
77
# and give it an appropriate name, e.g.
88
# cp .github/workflows/upgrade-check.yml.sample .github/workflows/upgrade-check.yml
9+
#
10+
# Workflow uses https://github.com/peter-evans/create-pull-request to handle the pull request action.
11+
# See the docs for action inputs.
12+
#
13+
# In order for GitHub actions to create pull requests that make changes to workflows in `.github/workflows`,
14+
# a token for each deployment must be provided. Both user PAT and fine-grained tokens should work, but it was tested
15+
# with a PAT. Fine-grained repo-scoped token is preferred if possible but requires organisation admin privileges.
16+
#
17+
# See https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
18+
# for security considerations around tokens. TREAT YOUR ACCESS TOKENS LIKE PASSWORDS.
19+
#
20+
# The following repository permissions must be set for the PAT:
21+
# - `Workflows: Read and write`
22+
# - `Actions: Read and write`
23+
# - `Pull requests: Read and write`
24+
# The PAT should then be copied into an Actions repository secret in the downstream repo with the title `WORKFLOW_TOKEN`.
925

1026
name: Check for upstream updates
1127
on:
@@ -15,10 +31,6 @@ on:
1531
jobs:
1632
check_for_update:
1733
runs-on: ubuntu-22.04
18-
# permissions:
19-
# contents: write
20-
# pull-requests: write
21-
# actions: write
2234

2335
steps:
2436
- name: Checkout the config repo
@@ -27,7 +39,7 @@ jobs:
2739
fetch-depth: 0
2840
fetch-tags: true
2941

30-
# Based on equivalent GitLab CI job
42+
# Based on equivalent azimuth-config job
3143
- name: Check for new release
3244
shell: bash
3345
run: |

README.md

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -147,19 +147,6 @@ Please see the [monitoring-and-logging.README.md](docs/monitoring-and-logging.RE
147147

148148
## CI/CD automation
149149

150-
A GitHub Actions workflow which checks for new upstream version release tags and creates a PR to update the downstream repo, can be found at:
150+
The `.github` directory contains a set of sample workflows which can be used by downstream site-specific configuration repositories to simplify ongoing maintainence tasks. These include:
151151

152-
.github/workflows/upgrade-check.yml.sample
153-
154-
If activated, the workflow is scheduled by default to run every day at 9 AM UTC and can be triggered manually via the `workflow_dispatch` event. How to activate the workflow is detailed at the top of the file.
155-
156-
Workflow uses [create-pull-request](https://github.com/peter-evans/create-pull-request) to handle the pull request action. See for action inputs.
157-
158-
In order for GitHub actions to fetch workflow changes in `.github/workflows`, a PAT for each deployment must be provided.
159-
160-
The following repository permissions must be set for the PAT:
161-
- `Workflows: Read and write`
162-
- `Actions: Read and write`
163-
- `Pull requests: Read and write`
164-
165-
The PAT should then be copied into an Actions repository secret in the downstream repo with the title `WORKFLOW_TOKEN`.
152+
- An [upgrade check](.github/workflows/upgrade-check.yml.sample) workflow which automatically checks this upstream stackhpc/ansible-slurm-appliance repo for new releases and proposes a pull request to the downstream site-specific repo when a new release is published.

0 commit comments

Comments
 (0)