fix(gha): Deployment workflow for the "main" branch is invalid #395
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 PR | |
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
defaults: | |
run: | |
shell: bash -exuo pipefail {0} | |
jobs: | |
env: | |
name: Environment | |
runs-on: ubuntu-22.04 | |
outputs: | |
name: ${{ steps.env.outputs.name }} | |
steps: | |
- id: env | |
uses: arikkfir/delivery-env-name@v1 | |
with: | |
branch: ${{ github.event.pull_request.head.ref }} | |
deploy: | |
name: Deploy | |
needs: env | |
runs-on: ubuntu-22.04 | |
environment: | |
name: ${{ needs.env.outputs.name }} | |
url: https://acme.${{ needs.env.outputs.name }}.greenstar.kfirs.com | |
steps: | |
- uses: arikkfir/deploy@24e954c8d068a6bd7a2cf715521ea0cab03fc4b4 | |
with: | |
repository: greenstar | |
branch: ${{ github.event.pull_request.head.ref }} | |
sha: ${{ github.event.pull_request.head.sha }} | |
environment: ${{ needs.env.outputs.name }} | |
token: ${{ secrets.ARIKKFIR_GHA_AUTOMATION }} |