Skip to content

Commit fc34e08

Browse files
authored
Merge branch 'fortran-lang:main' into add_timestamp
2 parents 45d2d9f + 826c017 commit fc34e08

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/fpm-version-update.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,18 @@ jobs:
2828
- name: Extract current formula version
2929
id: get-current-version
3030
run: |
31-
CURRENT_VERSION="$(grep -oP 'url "https://github.com/fortran-lang/fpm/releases/download/v\K[0-9.]+' Formula/fpm.rb)"
31+
CURRENT_VERSION="$(grep -oP 'url "https://github.com/fortran-lang/fpm/releases/download/v\K[0-9.]+' Formula/fpm.rb | head -n 1)"
3232
echo "CURRENT_VERSION=${CURRENT_VERSION}" >> "$GITHUB_ENV"
3333
echo "Current version: ${CURRENT_VERSION}"
3434
3535
- name: Compare versions
3636
id: check-update
3737
run: |
38-
if [ "${LATEST_VERSION}" != "${CURRENT_VERSION}" ]; then
38+
if [ "${LATEST_VERSION}" != "${CURRENT_VERSION}" ] || [ "${GITHUB_EVENT_NAME}" == "workflow_dispatch" ]; then
3939
echo "New version available!"
4040
echo "UPDATE_NEEDED=true" >> "$GITHUB_ENV"
4141
else
42+
echo "UPDATE_NEEDED=false" >> "$GITHUB_ENV"
4243
echo "No update needed."
4344
fi
4445
@@ -81,7 +82,7 @@ jobs:
8182
- name: Create Pull Request
8283
if: env.UPDATE_NEEDED == 'true'
8384
id: create-pr
84-
uses: peter-evans/create-pull-request@v5
85+
uses: peter-evans/create-pull-request@v6
8586
with:
8687
token: ${{ secrets.GITHUB_TOKEN }}
8788
commit-message: "Update fpm to ${{ env.LATEST_VERSION }}"

0 commit comments

Comments
 (0)