Skip to content

don't tag main branch with anything but latest (#26) #9

don't tag main branch with anything but latest (#26)

don't tag main branch with anything but latest (#26) #9

Workflow file for this run

name: Push
on:
push:
branches:
- main
env:
environment: production
jobs:
log:
runs-on: ubuntu-latest
steps:
- name: Log event
run: |
echo "json: ${{ github }}"
printenv
deploy_production:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- id: build
uses: ./.github/actions/build
with:
push: true
username: ${{ github.actor}}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy to (production)
uses: ./.github/actions/deploy
with:
config: ${{ github.workspace }}/fly-${{ env.environment }}.toml
token: ${{ secrets.FLY_TOKEN }}
image: ${{ steps.build.outputs.tags }}
- id: pr_url
shell: bash
run: |
echo "url=${{ github.repositoryUrl }}/pull/${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT
- name: Notify (scuccessful deployment)
if: success()
uses: ./.github/actions/slack
with:
message: ":tada: Successfully deployed to ${{ env.environment }} :white_check_mark:! <${{ steps.pr_url.outputs.url }}>"
webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}
- name: Notify (failed deployment)
if: failure()
uses: ./.github/actions/slack
with:
message: ":fail: Failed to deploy to ${{ env.environment }} :red_flag:! <${{ steps.pr_url.outputs.url }}>"
webhook_url: ${{ secrets.SLACK_WEBHOOK_URL }}