mirror of
https://github.com/bitwarden/server.git
synced 2024-12-03 14:03:33 +01:00
Merge branch 'BRE-291-ephemeral-env-cleanup-workflow' into ephem-test-01
This commit is contained in:
commit
9ccc42992e
@ -8,24 +8,27 @@ jobs:
|
||||
validate-pr:
|
||||
name: Validate PR
|
||||
runs-on: ubuntu-24.04
|
||||
outputs:
|
||||
config-exists: ${{ steps.validate-config.outputs.config-exists }}
|
||||
steps:
|
||||
- name: Checkout PR
|
||||
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
|
||||
|
||||
- name: Validate config existed on branch
|
||||
id: validate-config
|
||||
run: |
|
||||
# Search the git history for config files, exit if not found.
|
||||
if [[ -z $(git rev-list --all -- "ephemeral-environments/$GITHUB_HEAD_REF.yaml") ]]; then
|
||||
echo "No ephemeral environment config found on branch, exiting."
|
||||
exit 1
|
||||
if [[ -n $(git rev-list --all -- "ephemeral-environments/$GITHUB_HEAD_REF.yaml") ]]; then
|
||||
echo "Ephemeral environment config found on branch, continuing."
|
||||
echo "config-exists=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
echo "Ephemeral environment config found on branch, continuing."
|
||||
|
||||
cleanup-config:
|
||||
name: Cleanup ephemeral environment
|
||||
runs-on: ubuntu-24.04
|
||||
needs: validate-pr
|
||||
if: ${{ needs.validate-pr.outputs.config-exists }}
|
||||
steps:
|
||||
- name: Log in to Azure - CI subscription
|
||||
uses: Azure/login@e15b166166a8746d1a47596803bd8c1b595455cf # v1.6.0
|
||||
|
Loading…
Reference in New Issue
Block a user