Skip to content

Scheduled publishing - mikealfare #74

Scheduled publishing - mikealfare

Scheduled publishing - mikealfare #74

# **what?**
# Automatically publishes all adapter packages to the internal AWS CodeArtifact repository on a schedule.
# **why?**
# Ensures internal tools always have access to the latest versions of adapter packages.
# **when?**
# This workflow runs on a schedule every Sunday at midnight UTC.
name: "Scheduled publishing"
run-name: "Scheduled publishing - ${{ github.actor }}"
on:
schedule:
- cron: "0 0 * * SUN"
permissions:
id-token: write
contents: read
jobs:
publish:
strategy:
matrix:
package:
- "dbt-athena"
- "dbt-bigquery"
- "dbt-postgres"
- "dbt-redshift"
- "dbt-snowflake"
- "dbt-spark"
fail-fast: false
uses: ./.github/workflows/publish-internal.yml
with:
package: ${{ matrix.package }}
secrets: inherit
notify-failure:
needs:
- publish
if: ${{ failure() }}
runs-on: ${{ vars.DEFAULT_RUNNER }}
steps:
- name: "Notify Slack of failure"
uses: ravsamhq/notify-slack-action@be814b201e233b2dc673608aa46e5447c8ab13f2 # ravsamhq/notify-slack-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: "failure"
notification_title: "{workflow} {status_message}"
message_format: "{emoji} *{workflow}* {status_message} for <{repo_url}|{repo}>"
footer: "View run: {run_url}"
notify_when: "failure"
mention_groups: ${{ vars.SLACK_ON_CALL }}
mention_groups_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DEV_ADAPTER_ALERTS }}