Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/update-elixir-patches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,20 @@ jobs:
- elixir_version: "1.14"
name: '1_14'
timeout-minutes: 10
env:
branch: bump-elixir-${{ matrix.elixir_version }}
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v3
- name: SKIP IF THE PR ALREADY EXISTS
- name: FAIL IF THE PR ALREADY EXISTS
id: check-for-branch
run: |
set +e
git ls-remote --exit-code --heads origin bump-elixir-${{ matrix.elixir_version }}
echo "::set-output name=c::$?"
if git ls-remote --exit-code --heads origin ${{ env.branch }}; then
echo "Branch ${{ env.branch }} already exits"
exit 1
fi
- name: DETERMINE LATEST PATCH & SHA
if: steps.check-for-branch.outputs.c != 0
id: fetch-version
run: |
TAG_NAME=$(curl -s GET https://api.github.com/repos/elixir-lang/elixir/tags?per_page=100 \
Expand All @@ -47,10 +50,9 @@ jobs:
exit 1
fi

echo "::set-output name=VERSION::${TAG_NAME#v}"
echo "::set-output name=SHA::${SHA}"
echo "VERSION=${TAG_NAME#v}" >> $GITHUB_OUTPUT
echo "SHA=${SHA}" >> $GITHUB_OUTPUT
- name: MODIFY VERSION FILE
if: steps.check-for-branch.outputs.c != 0
run: |
sudo npm install --global --silent @bazel/buildozer

Expand All @@ -67,8 +69,7 @@ jobs:
set -x
git diff
- name: CREATE PULL REQUEST
if: steps.check-for-branch.outputs.c != 0
uses: peter-evans/create-pull-request@v4.2.3
uses: peter-evans/create-pull-request@v5.0.0
with:
token: ${{ secrets.REPO_SCOPED_TOKEN }}
committer: GitHub <noreply@github.com>
Expand All @@ -84,6 +85,5 @@ jobs:
labels: |
backport-v3.11.x
backport-v3.10.x
backport-v3.9.x
branch: bump-elixir-${{ matrix.elixir_version }}
branch: ${{ env.branch }}
delete-branch: true
23 changes: 12 additions & 11 deletions .github/workflows/update-otp-patches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,22 @@ jobs:
backport-v3.11.x
backport-v3.10.x
timeout-minutes: 10
env:
branch: bump-otp-${{ matrix.erlang_version }}
steps:
- name: CHECKOUT REPOSITORY
uses: actions/checkout@v3
with:
ref: ${{ matrix.branch }}
- name: SKIP IF THE PR ALREADY EXISTS
- name: FAIL IF THE PR ALREADY EXISTS
id: check-for-branch
run: |
set +e
git ls-remote --exit-code --heads origin bump-otp-${{ matrix.erlang_version }}
echo "::set-output name=c::$?"
if git ls-remote --exit-code --heads origin ${{ env.branch }}; then
echo "Branch ${{ env.branch }} already exits"
exit 1
fi
- name: DETERMINE LATEST PATCH & SHA
if: steps.check-for-branch.outputs.c != 0
id: fetch-version
run: |
TAG_NAME=$(curl -s GET https://api.github.com/repos/erlang/otp/tags?per_page=100 \
Expand Down Expand Up @@ -90,11 +93,10 @@ jobs:
exit 1
fi

echo "::set-output name=VERSION::${VERSION}"
echo "::set-output name=SHA::${SHA}"
echo "::set-output name=SHA2::${SHA2}"
echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
echo "SHA=${SHA}" >> $GITHUB_OUTPUT
echo "SHA2=${SHA2}" >> $GITHUB_OUTPUT
- name: MODIFY VERSION FILE
if: steps.check-for-branch.outputs.c != 0
run: |
sudo npm install --global --silent @bazel/buildozer

Expand Down Expand Up @@ -141,8 +143,7 @@ jobs:
set -x
git diff
- name: CREATE PULL REQUEST
if: steps.check-for-branch.outputs.c != 0
uses: peter-evans/create-pull-request@v4.2.3
uses: peter-evans/create-pull-request@v5.0.0
with:
token: ${{ secrets.REPO_SCOPED_TOKEN }}
committer: GitHub <noreply@github.com>
Expand All @@ -156,5 +157,5 @@ jobs:
commit-message: |
Adopt otp ${{ steps.fetch-version.outputs.VERSION }}
labels: ${{ matrix.labels }}
branch: bump-otp-${{ matrix.erlang_version }}
branch: ${{ env.branch }}
delete-branch: true