Repository navigation
Upgrade tailscale github action #570
This file contains hidden or 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: Main Build Deploy | |
| on: | |
| push: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| if: ${{ github.actor != 'dependabot[bot]' }} | |
| uses: ./.github/workflows/build.yml | |
| secrets: inherit | |
| deploy: | |
| if: ${{ github.actor != 'dependabot[bot]' }} | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: artifacts | |
| - name: Deploy | |
| env: | |
| DO_ACCESS_TOKEN: ${{ secrets.DO_ACCESS_TOKEN }} | |
| GITHUB_SHA: ${{ github.sha }} | |
| run: ./.github/scripts/deploy-do.sh | |
| - name: Start tailscale | |
| uses: tailscale/github-action@v4 | |
| with: | |
| authkey: ${{ secrets.TAILSCALE_AUTHKEY }} | |
| - name: Deploy agents | |
| uses: dawidd6/action-ansible-playbook@v2 | |
| env: | |
| OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} | |
| DD_API_KEY: ${{ secrets.DD_API_KEY }} | |
| with: | |
| playbook: deploy-agent.yaml | |
| key: ${{ secrets.AGENT_SSH_KEY }} | |
| options: | | |
| --inventory inventory.yaml | |
| - name: Actions Ntfy | |
| if: failure() | |
| run: | | |
| curl -s \ | |
| -H "Title: Github Action" \ | |
| -H "Content-Type: text/plain" \ | |
| -H "Priority: high" \ | |
| -H "Actions: view, View Build, https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}" \ | |
| -d $'\nStatus: ${{ job.status}}' \ | |
| ${{ secrets.NTFY_URL }} >/dev/null |