Release 10.8.6 #382
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: Janitor | |
on: | |
push: | |
branches: | |
- "develop" | |
jobs: | |
branch: | |
name: Find branch name | |
runs-on: ubuntu-latest | |
outputs: | |
branchname: ${{ steps.branch.outputs.BRANCH_TO_DELETE }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Dump GitHub context | |
env: | |
GITHUB_CONTEXT: ${{ toJson(github) }} | |
run: echo "$GITHUB_CONTEXT" | |
- name: Get branch name and delete merged feature branches | |
id: branch | |
run: ./.github/scripts/clean-merged-branches.sh | |
build: | |
needs: branch | |
name: Storage container cleanup | |
if: ${{ needs.branch.outputs.branchname }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
brand: ["payex", "swedbankpay"] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
# Set brand specific variables | |
- name: Environment variables | |
id: variables | |
run: ./.github/scripts/variables.sh --brand ${{ matrix.brand }} --ref ${{ github.ref }} | |
- name: Azure Login | |
uses: azure/[email protected] | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS_STAGE }} | |
- name: Delete feature folders | |
uses: azure/CLI@v1 | |
with: | |
inlineScript: | | |
az storage blob delete-batch -s "\$web" --pattern ${{ needs.branch.outputs.branchname }}/** --account-name ${{ steps.variables.outputs.AZURE_ACCOUNT_STAGE }} |