Skip to content

Commit 79d7179

Browse files
committed
Fix the persistent breakage when cleaning up branches
The github workflow that we have set up for branch deletion doesn't work: - the `on: delete` event does not support the `branches:` filter - the `mode` flag for the aws_s3 module does not have `delete` as one of the options. The proper option appears to be `delobj`.
1 parent 4d80f88 commit 79d7179

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/workflows/feature_branch_deletion.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,10 @@
22
name: Feature branch deletion cleanup
33
env:
44
LC_ALL: "C.UTF-8" # prevent ERROR: Ansible could not initialize the preferred locale: unsupported locale setting
5-
on:
6-
delete:
7-
branches:
8-
- feature_**
5+
on: delete
96
jobs:
10-
push:
7+
branch_delete:
8+
if: ${{ github.event.ref_type == 'branch' && startsWith(github.event.ref, 'feature_') }}
119
runs-on: ubuntu-latest
1210
timeout-minutes: 20
1311
permissions:
@@ -22,6 +20,4 @@ jobs:
2220
run: |
2321
ansible localhost -c local, -m command -a "{{ ansible_python_interpreter + ' -m pip install boto3'}}"
2422
ansible localhost -c local -m aws_s3 \
25-
-a "bucket=awx-public-ci-files object=${GITHUB_REF##*/}/schema.json mode=delete permission=public-read"
26-
27-
23+
-a "bucket=awx-public-ci-files object=${GITHUB_REF##*/}/schema.json mode=delobj permission=public-read"

0 commit comments

Comments
 (0)