Deploy Windmill #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
name: Deploy Windmill | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
required: true | |
type: string | |
description: The version tag to be deployed | |
jobs: | |
deploy-windmill: | |
name: Deploy Windmill | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download Release | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: gh release download windmill/${{ inputs.version }} --dir release/ | |
- name: Extract release assets | |
run: unzip release/windmill.${{ inputs.version }}.zip -d release/ | |
- name: Replace variables | |
env: | |
DEPLOY_URL: windmill.inside.mobiltk.com.br | |
run: | | |
sed -i "s/DEPLOY_URL/$DEPLOY_URL" release/windmill.hcl | |
- name: Pack assets | |
run: zip -r -j windmill.${{ inputs.version }}.zip release/windmill.hcl | |
- name: Upload assets | |
env: | |
GH_TOKEN: ${{ github.token }} | |
VERSION: ${{ inputs.version }} | |
run: gh release upload windmill/$VERSION windmill.$VERSION.zip --clobber | |
- name: Deploy | |
uses: mobiltracker/gh-actions/nomad/deploy@master | |
with: | |
jobfile_path: release/windmill.hcl | |
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
- name: Add environment badge release | |
uses: mobiltracker/gh-actions/gh/add-environment-badge@master | |
with: | |
token: ${{ github.token }} | |
tag_prefix: windmill | |
tag: windmill/${{ inputs.version }} | |
environment: production | |
color: success |