[WM] Script 'f/utilities/well_regarded_script' deployed #43
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: "Push staging to Windmill workspace" | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- "staging" | |
# if the windmill workspace is persisted in a subfolder of this repos, you can add the following to avoid pushing to windmill when there's no change | |
# paths: | |
# - wm/** | |
env: | |
WMILL_URL: https://app.windmill.dev/ | |
WMILL_WORKSPACE: github-sync-example-staging | |
jobs: | |
sync: | |
environment: windmill | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Deno | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: vx.x.x | |
# We check the commit to make sure it doesn't start with [WM] which commits coming from Windmill Git Sync do.\ | |
# If that's the case, then we stop the workflow as we want to avoid overwriting changes that are out-of-sync | |
# (for instance if one were to deploy in quick succession) | |
- name: Check commit message | |
id: check_message | |
run: | | |
COMMIT_MESSAGE="${{ github.event.head_commit.message }}" | |
if [[ "$COMMIT_MESSAGE" =~ ^\[WM\] ]]; then | |
echo "Commit message starts with '[WM]', skipping push to Windmill to avoid overwriting deploy that immediately follows it" | |
echo "skip=skip" >> $GITHUB_OUTPUT | |
fi | |
- name: Push changes | |
if: steps.check_message.outputs.skip != 'skip' | |
run: | | |
deno run -A https://deno.land/x/wmill@v1.333.4/main.ts workspace add __automation ${{ env.WMILL_WORKSPACE }} ${{ env.WMILL_URL }} --token ${{ secrets.WMILL_TOKEN }} | |
deno run -A https://deno.land/x/wmill@v1.333.4/main.ts sync push --yes --raw --skip-variables --skip-secrets --skip-resources |