-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added pr-closed.yml from ACCESS-OM2 without changes
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: PR Closed Cleanup | ||
# Remove prereleases that were part of a closed PR, so we save space | ||
# on our deployment targets. If needed, one can still get the | ||
# spack.yaml as part of the closed PR and revive it themselves. | ||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- main | ||
- backport/*.* | ||
paths: | ||
- config/** | ||
- spack.yaml | ||
jobs: | ||
setup: | ||
name: Setup | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version-pattern: ${{ steps.version.outputs.pattern }} | ||
steps: | ||
- name: Version Pattern | ||
id: version | ||
# For example, `access-om3-pr12-*` | ||
run: | | ||
repo_name_lower=$(echo ${{ github.event.repository.name }} | tr [:upper:] [:lower:]) | ||
echo "pattern=${repo_name_lower}-pr${{ github.event.pull_request.number }}-*" >> $GITHUB_OUTPUT | ||
undeploy-prereleases: | ||
name: Undeploy Prereleases | ||
needs: | ||
- setup | ||
uses: access-nri/build-cd/.github/workflows/undeploy-1-setup.yml@main | ||
with: | ||
version-pattern: ${{ needs.setup.outputs.version-pattern }} | ||
secrets: inherit |