Skip to content

Commit ab67f83

Browse files
committed
Merge branch 'add_timestamp' of https://github.com/perazz/homebrew-fortran into add_timestamp
2 parents a2581c2 + fc34e08 commit ab67f83

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
@@ -89,7 +90,7 @@ jobs:
8990
- name: Create Pull Request
9091
if: env.UPDATE_NEEDED == 'true'
9192
id: create-pr
92-
uses: peter-evans/create-pull-request@v5
93+
uses: peter-evans/create-pull-request@v6
9394
with:
9495
token: ${{ secrets.GITHUB_TOKEN }}
9596
commit-message: "Update fpm to ${{ env.LATEST_VERSION }}"

0 commit comments

Comments
 (0)