Skip to content

Commit 01c2778

Browse files
committed
fix(workflows/update): add tracing
1 parent 3345054 commit 01c2778

1 file changed

Lines changed: 17 additions & 12 deletions

File tree

.github/workflows/update.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -39,31 +39,36 @@ jobs:
3939
git config user.name "PlaceOS Robot"
4040
4141
- name: Update files
42+
shell: bash
4243
run: |
44+
set -euo pipefail
45+
set -x #echo on
46+
4347
branch='release/${{ needs.latest.outputs.version }}'
4448
4549
# Switch branch to release/${{ needs.latest.outputs.version }}
4650
git checkout -b "$branch"
4751
4852
# Update `.env`
49-
sed -i '.bak' -E 's/^PLACEOS_TAG=.*/PLACEOS_TAG=${PLACEOS_TAG:-placeos-${{ needs.placeos-latest.outputs.version }}}/g' \
50-
.env
53+
sed --in-place=.bak -E 's/^PLACEOS_TAG=.*/PLACEOS_TAG=${PLACEOS_TAG:-placeos-${{ needs.latest.outputs.version }}}/g' \
54+
.env
5155
5256
# Update CI matrix
53-
sed -i '.bak' -E 's/( - latest)/ - ${{ needs.latest.outputs.version }}\n\1/g' \
54-
.github/workflows/ci.yml
57+
sed --in-place=.bak -E 's/( - latest)/ - ${{ needs.latest.outputs.version }}\n\1/g' \
58+
.github/workflows/ci.yml
5559
5660
# Commit
57-
git commit --message='build: update to ${{ needs.latest.outputs.version }}' \
58-
.env \
59-
.github/workflows/ci.yml
61+
git commit -m 'build: update to ${{ needs.latest.outputs.version }}' \
62+
.env \
63+
.github/workflows/ci.yml
6064
6165
# Create PR
6266
gh pr create \
63-
--fill \
64-
--head "$branch" \
65-
--label 'type: maintenance' \
66-
--base master \
67-
--body 'See the details for `placeos-${{ steps.get-latest.outputs.version }}`[here](https://github.com/PlaceOS/PlaceOS/releases/tag/${{ needs.latest.outputs.version }}).'
67+
--fill \
68+
--head "$branch" \
69+
--label 'type: maintenance' \
70+
--base master \
71+
--body 'See the details for `placeos-${{ steps.get-latest.outputs.version }}`[here](https://github.com/PlaceOS/PlaceOS/releases/tag/${{ needs.latest.outputs.version }}).'
72+
6873
env:
6974
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)