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
GHA to create issue on new IANA release #173
Merged
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b979f8a
GHA to create issue on new IANA release
nilsnolde ea881a9
test on this branch
nilsnolde 7ee4103
try to trigger CI again
nilsnolde d16ba02
needs those env vars apparently
nilsnolde d252e54
try to trigger CI again
nilsnolde 9b6780b
test success, remove branch againi
nilsnolde 58601ee
add space
nilsnolde File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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,43 @@ | ||
name: Check for new IANA release | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * 0" | ||
workflow_dispatch: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure how familiar you are with GHA, but this allows you to trigger this action manually in the "Actions" tab |
||
|
||
jobs: | ||
check_tz: | ||
name: Check latest IANA release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Run script | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
WORKFLOW_RUN_ID: ${{ github.run_id }} | ||
WORKFLOW_JOB_ID: ${{ github.job }} | ||
run: | | ||
set -e | ||
|
||
git config user.name 'github-actions[bot]' | ||
git config user.email 'github-actions[bot]@users.noreply.github.com' | ||
|
||
latest_tag=$(curl --silent -L -H "Accept: application/vnd.github+json" https://api.github.com/repos/eggert/tz/tags | jq -r '.[0].name') | ||
current_tag=$(cat TZ_RELEASE) | ||
|
||
if [[ $latest_tag == $current_tag ]]; then | ||
echo "tz up to date" | ||
exit 0 | ||
fi | ||
|
||
echo "New tz release available: ${latest_tag}" | ||
|
||
# create issue with new release | ||
body=$(echo "IANA released ${latest_tag}. See [here](https://github.com/eggert/tz/blob/main/NEWS) for the latest changes made to tz.\ | ||
Created by workflow run [#${WORKFLOW_RUN_ID}](https://github.com/evansiroky/timezone-boundary-builder/actions/runs/${WORKFLOW_RUN_ID})." | xargs) | ||
gh issue create --title "IANA Release ${latest_tag}" --body "${body}" | ||
|
||
exit 1 |
This file contains 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 @@ | ||
2023d |
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.
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.
and it runs once a week (sunday midnight)