-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update & cleanup workflows. Also introduce
make
to manage de…
…pendencies and testing (#392) * workflow rework, mise, precommit, linting * add a makefile * update readme to include make * remove github token where not needed * comments * restrict permissions on release workflows * verify updatecli * remove test comment * githubcli --------- Co-authored-by: jamie zieziula <[email protected]>
- Loading branch information
1 parent
16d85c9
commit 16957fc
Showing
20 changed files
with
259 additions
and
139 deletions.
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
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
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
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
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
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,49 @@ | ||
--- | ||
name: Notify on Failure | ||
|
||
"on": | ||
workflow_run: | ||
workflows: | ||
- Deploy Latest Helm Releases to Internal Cluster | ||
- Release Prefect Server and Worker Helm Charts | ||
- Release Prometheus Prefect Exporter Helm Chart | ||
- Updatecli Major Dependency Updates | ||
- Updatecli Minor Dependency Updates | ||
types: [completed] | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
notify: | ||
name: Notify on Failure | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'failure' }} | ||
permissions: | ||
# required to introspect the workflow run | ||
actions: read | ||
# required to read from the repo | ||
contents: read | ||
steps: | ||
- name: Format date | ||
run: | | ||
formatted_date=$(date -d "${{ github.event.workflow_run.run_started_at }}" "+%b %d at %I:%M %p") | ||
echo "FORMATTED_DATE=$formatted_date" >> $GITHUB_ENV | ||
- name: Send Slack notification | ||
uses: 8398a7/action-slack@v3 | ||
with: | ||
status: custom | ||
# https://api.slack.com/reference/messaging/attachments | ||
custom_payload: | | ||
{ | ||
attachments: [{ | ||
pretext: ':x: Workflow triggered by ${{ github.actor }} failed', | ||
title: '${{ github.event.workflow_run.display_title }} #${{github.event.workflow_run.run_number}}', | ||
title_link: '${{ github.event.workflow_run.html_url }}', | ||
footer: '${{ github.repository }} | ${{ env.FORMATTED_DATE }} UTC', | ||
footer_icon: 'https://slack-imgs.com/?c=1&o1=wi32.he32.si&url=https%3A%2F%2Fslack.github.com%2Fstatic%2Fimg%2Ffavicon-neutral.png', | ||
color: 'danger', | ||
}] | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_GHA_JOB_STATUS }} |
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
6 changes: 6 additions & 0 deletions
6
.github/workflows/prometheus-prefect-exporter-lint-and-test.yaml
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,27 @@ | ||
--- | ||
name: Updatecli Major Dependency Updates | ||
|
||
"on": | ||
schedule: | ||
- cron: 0 15 1 * * # First of the month @ 3pm UTC | ||
workflow_dispatch: {} | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
updatecli_major: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# required to write to the repo | ||
contents: write | ||
# required to open a pr with updatecli changes | ||
pull-requests: write | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: updatecli-major-apply | ||
uses: prefecthq/actions-updatecli-apply@main | ||
with: | ||
manifest-path: .github/updatecli/manifest-major.yaml | ||
run-type: major |
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,27 @@ | ||
--- | ||
name: Updatecli Minor Dependency Updates | ||
|
||
"on": | ||
schedule: | ||
- cron: 0 15 * * 1 # Monday @ 3pm UTC | ||
workflow_dispatch: {} | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
updatecli_minor: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# required to write to the repo | ||
contents: write | ||
# required to open a pr with updatecli changes | ||
pull-requests: write | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: updatecli-minor-apply | ||
uses: prefecthq/actions-updatecli-apply@main | ||
with: | ||
manifest-path: .github/updatecli/manifest-minor.yaml | ||
run-type: minor |
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 |
---|---|---|
@@ -1,33 +1,30 @@ | ||
--- | ||
name: Validate updatecli config | ||
name: Validate Updatecli Config | ||
|
||
on: | ||
"on": | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- .github/updatecli/** | ||
|
||
# Do not grant jobs any permissions by default | ||
permissions: {} | ||
|
||
jobs: | ||
validate_updatecli_config: | ||
validate_updatecli_configs: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# required to read from the repo | ||
contents: read | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: install updatecli | ||
uses: updatecli/updatecli-action@v2 | ||
|
||
- name: run updatecli diff to validate config | ||
run: | | ||
updatecli diff --config .github/updatecli/manifest-minor.yaml | ||
updatecli diff --config .github/updatecli/manifest-major.yaml | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
- name: validate manifest-minor | ||
run: updatecli diff --config .github/updatecli/manifest-minor.yaml | ||
|
||
- name: validate manifest-major | ||
run: updatecli diff --config .github/updatecli/manifest-major.yaml |
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
Oops, something went wrong.