-
-
Notifications
You must be signed in to change notification settings - Fork 57
Added Update Default Lychee version workflow #284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 50 commits
Commits
Show all changes
51 commits
Select commit
Hold shift + click to select a range
ee4e35e
bump default version to latest 0.18.1
Arteiii 158365f
add checkbox option
Arteiii 43a64ff
Update action.yml
Arteiii 57db59e
Update entrypoint.sh
Arteiii b58fc0c
fixed checkbox args
Arteiii 41456f6
Update test.yml
Arteiii 18fd888
added version check for checkbox
Arteiii 291fb1f
Merge branch 'master' of https://github.com/Arteiii/lychee-action
Arteiii 9bdcfd4
Create lychee-version.yml
Arteiii 577cd3a
Update lychee-version.yml
Arteiii 6f61d90
Update lychee-version.yml
Arteiii 605ae2d
Update lychee-version.yml
Arteiii 7d05901
Update lychee-version.yml
Arteiii b326924
Update lychee-version.yml
Arteiii 5537d95
Update lychee-version.yml
Arteiii fb8e36d
Update lychee-version.yml
Arteiii 0da2584
test
Arteiii 12c117d
Update lychee-version.yml
Arteiii 2e80167
Update lychee-version.yml
Arteiii a824452
Update lychee-version.yml
Arteiii e574b68
Update lychee-version.yml
Arteiii 80a8e50
Update lychee-version.yml
Arteiii bd7e196
Update lychee-version.yml
Arteiii c983e6a
Update lychee-version.yml
Arteiii 446052f
Update lychee-version.yml
Arteiii 208b261
Update lychee-version.yml
Arteiii 77c68f7
Update lychee-version.yml
Arteiii f57aff7
Update lychee-version.yml
Arteiii 0d107f2
Update lychee-version.yml
Arteiii 389c11f
Update lychee-version.yml
Arteiii 5273775
Update lychee-version.yml
Arteiii 6c43d00
[create-pull-request] automated change
Arteiii 21257c4
fixed workflow naming and dispatch
Arteiii b076039
Merge pull request #3 from Arteiii/update-lychee-v0.18.1
Arteiii be98a93
Update lychee-version.yml
Arteiii a71cb0f
Merge branch 'master' of https://github.com/Arteiii/lychee-action
Arteiii cef667a
Update lychee-version.yml
Arteiii 98a1d87
test update
Arteiii 52acf31
Update lychee-version.yml
Arteiii f607cf4
Update lychee-version.yml
Arteiii 6e15e8d
Update lychee-version.yml
Arteiii 99a1097
[create-pull-request] automated change
Arteiii 63656f3
Merge pull request #4 from Arteiii/update-lychee-v0.18.1
Arteiii 8b8672a
Update lychee-version.yml
Arteiii 0c19eb3
Merge branch 'master' of https://github.com/Arteiii/lychee-action
Arteiii af47492
Update lychee-version.yml
Arteiii 89656d6
Update lychee-version.yml
Arteiii 54337ed
[create-pull-request] automated change
Arteiii 93730e1
Merge pull request #5 from Arteiii/update-lychee-v0.18.1
Arteiii 7600e8f
Aktualisieren von lychee-version.yml
Arteiii 397e293
Update .github/workflows/lychee-version.yml
Arteiii File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| name: "Update Lychee Default Version" | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: "0 0 * * 0" # every Sunday | ||
| workflow_dispatch: | ||
| repository_dispatch: | ||
|
|
||
| jobs: | ||
| check-lychee-version: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| outputs: | ||
| mismatch: ${{ steps.compare-versions.outputs.mismatch }} | ||
| action_lychee_version: ${{ steps.get-action-lychee-version.outputs.result }} | ||
| release_version: ${{ steps.get-lychee-release.outputs.release_version }} | ||
|
|
||
| name: Check lychee version | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Get current lychee release version | ||
| id: get-lychee-release | ||
| run: | | ||
| echo "Fetching the latest lychee release version..." | ||
| release=$(curl -s https://api.github.com/repos/lycheeverse/lychee/releases/latest | jq -r .tag_name) | ||
| release=${release#lychee-} # Strip the 'lychee-' prefix | ||
| echo "Latest release version fetched: $release" | ||
| echo "release_version=$release" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Extract lycheeVersion from action.yml | ||
| id: get-action-lychee-version | ||
| uses: mikefarah/yq@master | ||
| with: | ||
| cmd: yq '.inputs.lycheeVersion.default' action.yml | ||
|
|
||
| - name: Compare versions | ||
| id: compare-versions | ||
| run: | | ||
| echo "Comparing versions..." | ||
| action_lychee_version="${{ steps.get-action-lychee-version.outputs.result }}" | ||
| release_version="${{ steps.get-lychee-release.outputs.release_version }}" | ||
| echo "Action lychee version: $action_lychee_version" | ||
| echo "Latest release version: $release_version" | ||
| if [ "$action_lychee_version" != "$release_version" ]; then | ||
| echo "Versions do not match. Setting mismatch to true." | ||
| echo "mismatch=true" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "Versions match. Setting mismatch to false." | ||
| echo "mismatch=false" >> $GITHUB_OUTPUT | ||
| fi | ||
|
|
||
| create-pr: | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| needs: check-lychee-version | ||
| runs-on: ubuntu-latest | ||
| if: needs.check-lychee-version.outputs.mismatch == 'true' | ||
|
|
||
| name: Create PR to update lychee version | ||
| env: | ||
| action_lychee_version: ${{ needs.check-lychee-version.outputs.action_lychee_version }} | ||
| release_version: ${{ needs.check-lychee-version.outputs.release_version }} | ||
| update_branch_name: "update-lychee-${{ needs.check-lychee-version.outputs.release_version }}" | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Update lycheeVersion in action.yml | ||
| uses: mikefarah/yq@master | ||
| with: | ||
| cmd: yq -i '.inputs.lycheeVersion.default = "${{ env.release_version }}"' action.yml | ||
|
|
||
| - name: Create Pull Request | ||
| uses: peter-evans/create-pull-request@v7 | ||
| with: | ||
| branch: ${{ env.update_branch_name }} | ||
| title: "Update lycheeVersion to ${{ env.release_version }}" | ||
| body: "This PR updates the lycheeVersion to the latest release version ${{ env.release_version }} ." | ||
| labels: "automated-pr" | ||
| assignees: mre | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| name: Test lychee-action | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.