-
-
Notifications
You must be signed in to change notification settings - Fork 740
adding workflow files #2950
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
+93
−0
Merged
adding workflow files #2950
Changes from 2 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
0e75a5e
adding workflow files
jagdish-15 8d03422
Update .github/workflows/configlet-sync.yml
jagdish-15 0f84382
Update configlet-sync.yml to fix the command for tests
jagdish-15 853188c
Merge branch 'main' into add-sync-workflow
jagdish-15 4bc9381
Update configlet-sync.yml to ensure no duplicate issues are opened
jagdish-15 10a2a27
Merge pull request #2 from jagdish-15/add-sync-workflow
jagdish-15 14e89a1
Refactoring yml workflow for tests
jagdish-15 0cf40a5
Merge pull request #3 from jagdish-15/add-sync-workflow
jagdish-15 7730a50
Removing line causing error
jagdish-15 ab56210
Merge branch 'main' into add-sync-workflow
jagdish-15 527450f
Updating sync test
jagdish-15 f8dc41e
Merge branch 'add-sync-workflow' of https://github.com/jagdish-15/jav…
jagdish-15 6cbcf91
Updating sync test
jagdish-15 4491143
Updating workflow file to print body od the issue
jagdish-15 1f942d8
Adding GitHub API integration to ensure no duplicate issues are opened
jagdish-15 5a8b785
Adding backticks in issue content
jagdish-15 84f2619
Removing unnecesarry mkdir command
jagdish-15 82da5d0
Adding tests command
jagdish-15 b76a630
variable name mismatch
jagdish-15 231b7e8
Merge branch 'main' into add-sync-workflow
jagdish-15 81c27ee
Merge branch 'main' into add-sync-workflow
jagdish-15 ab090e7
Refactoring workflow into two different jobs and adding option to not…
jagdish-15 17754a0
removing env toggle for second job
jagdish-15 8f050cf
Removing dependency by replacing body-path by body
jagdish-15 d7f6607
Removing dependency by removing auto-sync dir and its usage
jagdish-15 4e7efff
Removing needs statement
jagdish-15 d1f3dec
Adding timeout (best GHA practice documentation)
jagdish-15 02435d1
Reducing timeout minutes
jagdish-15 dc8e4eb
Pinning test runner version (best GHA practice documentation)
jagdish-15 1714d68
Merge branch 'main' into add-sync-workflow
jagdish-15 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,8 @@ | ||
| This PR was generated automatically by a scheduled workflow. | ||
|
|
||
| It includes updates from `configlet sync` for: | ||
| - 📄 Documentation | ||
| - 🧭 Metadata | ||
| - 🗂️ Filepaths | ||
|
|
||
| Please review and merge if everything looks good! |
Empty file.
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,46 @@ | ||
| name: Configlet Auto Sync | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: '0 0 15 * *' | ||
|
|
||
| jobs: | ||
| configlet-auto-sync: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Fetch configlet | ||
| run: ./bin/fetch-configlet | ||
|
|
||
| - name: Run configlet sync for files | ||
| run: ./bin/configlet sync --docs --metadata --filepaths -u -y | ||
|
|
||
| - name: Create pull request if changes | ||
| uses: peter-evans/create-pull-request@v5 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| commit-message: "🤖 Auto-sync docs, metadata, and filepaths" | ||
| title: "🤖 Configlet sync: docs, metadata, and filepaths" | ||
| body-path: .github/auto-sync/PR_BODY.md | ||
| branch: configlet-auto-sync | ||
| delete-branch: true | ||
|
|
||
| - name: Run configlet sync for test and capture output | ||
| id: sync_test | ||
| run: | | ||
| ./bin/configlet sync --test | tee .github/auto-sync/sync-test-output.txt | ||
| echo "output<<EOF" >> $GITHUB_OUTPUT | ||
| cat .github/auto-sync/sync-test-output.txt >> $GITHUB_OUTPUT | ||
| echo "EOF" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Create issue if tests are not synced | ||
| if: ${{ !contains(steps.sync_test.outputs.output, 'Every exercise has up-to-date tests!') }} | ||
| uses: peter-evans/create-issue-from-file@v4 | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| title: "🚨 configlet sync --test found unsynced tests" | ||
| content-filepath: .github/auto-sync/sync-test-output.txt | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While testing, I just noticed this in the logs:
I think it should be
--tests(plural, not the singular--test), but we also need to choose an option betweenincludeandexclude(seeconfiglet --helpor its documentation for more details).Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that should be
--tests, apologies for the mix-up. And I it by default checks all the exercises withconfiglet sync --tests, so we don't need to useincludeas we only have to get the info about unsynced tests and not actually update thetest.tomlfiles