Skip to content

Commit

Permalink
Added pr-closed.yml from ACCESS-OM2 without changes
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeGat committed Apr 12, 2024
1 parent 54b0104 commit 2f4c8fc
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/pr-closed.yml
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

0 comments on commit 2f4c8fc

Please sign in to comment.