-
Notifications
You must be signed in to change notification settings - Fork 21
31 lines (28 loc) · 1.55 KB
/
arizona-bootstrap-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Create PR for new Arizona Bootstrap Release
on:
repository_dispatch:
types: az_bootstrap_release
jobs:
release:
name: Create PR
if: ${{ github.event.client_payload.branch == '2.x' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
# with:
# ssh-key: ${{ secrets.SELF_DEPLOY_KEY }}
- name: Create new branch and PR
run: |
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git config --global user.name "${GITHUB_ACTOR}"
git checkout -b 'az-bootstrap-${{ github.event.client_payload.version }}'
jq --indent 4 '.require."az-digital/arizona-bootstrap" |= "${{ github.event.client_payload.version }}"' composer.json > composer.json.new
mv composer.json.new composer.json
cat themes/custom/az_barrio/includes/common.inc | sed "s/^define('AZ_BOOTSTRAP_STABLE_VERSION'.*/define('AZ_BOOTSTRAP_STABLE_VERSION', '${{ github.event.client_payload.version }}');/g" > common.inc.new
mv common.inc.new themes/custom/az_barrio/includes/common.inc
git add composer.json themes/custom/az_barrio/includes/common.inc
git commit -m 'Update Arizona Bootstrap to ${{ github.event.client_payload.version }}'
git push --set-upstream origin 'az-bootstrap-${{ github.event.client_payload.version }}'
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
gh pr create --title 'Update Arizona Bootstrap to ${{ github.event.client_payload.version }}' --body ''