Skip to content

Commit

Permalink
debug: comment of "/deploy" on PRs
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
arikkfir committed Sep 5, 2023
1 parent c082ece commit efa43b6
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/pr_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
outputs:
ref: ${{ steps.get-ref-from-pr.outputs.ref || steps.get-ref-from-issue.outputs.ref }}
sha: ${{ steps.get-ref-from-pr.outputs.sha || steps.get-ref-from-issue.outputs.sha }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- run: |
cat <<EOF
Expand All @@ -42,15 +44,15 @@ jobs:
echo "ref=$(gh pr view ${{ github.event.issue.number }} --json headRefName | jq -r .headRefName)" >> "$GITHUB_OUTPUT"
echo "sha=$(gh pr view ${{ github.event.issue.number }} --json headRefOid | jq -r .headRefOid)" >> "$GITHUB_OUTPUT"
# deploy:
# name: Deploy
# uses: arikkfir/delivery/.github/workflows/deploy-to-environment.yml@main
# if: github.event_name == 'pull_request' || (github.event.issue.pull_request && github.event.comment.body == '/deploy')
# with:
# branch: ${{ github.event.pull_request.head.ref || github.event.issue.pull_request.head.ref }}
# images: |-
# ghcr.io/${{ github.repository }}/backend: ${{ github.event.pull_request.head.sha || github.event.issue.pull_request.head.sha }}
# ghcr.io/${{ github.repository }}/frontend: ${{ github.event.pull_request.head.sha || github.event.issue.pull_request.head.sha }}
# ghcr.io/${{ github.repository }}/migrations: ${{ github.event.pull_request.head.sha || github.event.issue.pull_request.head.sha }}
# ghcr.io/${{ github.repository }}/neo4j: ${{ github.event.pull_request.head.sha || github.event.issue.pull_request.head.sha }}
# secrets: inherit
deploy:
name: Deploy
uses: arikkfir/delivery/.github/workflows/deploy-to-environment.yml@main
if: github.event_name == 'pull_request' || (github.event.issue.pull_request && github.event.comment.body == '/deploy')
with:
branch: ${{ github.event.pull_request.head.ref || github.event.issue.pull_request.head.ref }}
images: |-
ghcr.io/${{ github.repository }}/backend: ${{ github.event.pull_request.head.sha || github.event.issue.pull_request.head.sha }}
ghcr.io/${{ github.repository }}/frontend: ${{ github.event.pull_request.head.sha || github.event.issue.pull_request.head.sha }}
ghcr.io/${{ github.repository }}/migrations: ${{ github.event.pull_request.head.sha || github.event.issue.pull_request.head.sha }}
ghcr.io/${{ github.repository }}/neo4j: ${{ github.event.pull_request.head.sha || github.event.issue.pull_request.head.sha }}
secrets: inherit

0 comments on commit efa43b6

Please sign in to comment.