Drift check #783
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
name: Drift check | |
on: | |
schedule: | |
# Run every day at 12 PM Europe/Oslo time | |
- cron: '0 12 * * *' | |
workflow_dispatch: | |
jobs: | |
check-for-changes: | |
name: Check for changes | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v2 | |
- name: Use Node LTS ✨ | |
uses: actions/setup-node@v3 | |
with: | |
node-version: lts/* | |
cache: pnpm | |
- name: Install dependencies 📦️ | |
run: pnpm install --frozen-lockfile | |
- name: Applying infrastructure 🚀 | |
uses: pulumi/actions@v6 | |
id: pulumi | |
env: | |
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} | |
with: | |
command: preview | |
refresh: true | |
stack-name: bjerk/prod | |
expect-no-changes: true | |
- uses: slackapi/slack-github-action@v1 | |
if: failure() | |
with: | |
payload: | | |
{ | |
"repository": "${{ github.repository }}", | |
"jobUrl": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", | |
"message": "Drift check failed", | |
"details": ${{ toJSON(steps.pulumi.outputs.output) }} | |
} | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_DRIFTCHECK_WEBHOOK_URL }} |