Skip to content

Commit

Permalink
Bypass GitHub commit status verification
Browse files Browse the repository at this point in the history
From https://docs.github.com/en/rest/deployments/deployments#create-a-deployment

> The status contexts to verify against commit status checks. If you
> omit this parameter, GitHub verifies all unique contexts before creating
> a deployment. To bypass checking entirely, pass an empty array. Defaults
> to all unique contexts.

Not sure why, but this has started to fail Fly deployments, see comments
at Starkast/wikimum@179b52e

We should still be good, as the instructions are to trigger this action
after a CI workflow run with conclusion 'success'.
  • Loading branch information
dentarg committed Oct 29, 2022
1 parent 2f13862 commit 5a84276
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,22 @@ runs:

- name: Create deployment in GitHub
if: ${{ inputs.github-token }}
shell: bash
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
shell: bash
run: |
deploymentId=$(gh api repos/${{ github.repository }}/deployments \
--method POST \
--header "Accept: application/vnd.github.v3+json" \
--field ref='${{ github.event.repository.default_branch }}' \
--field environment=$FLY_HOSTNAME \
--field description='Fly deploy from GitHub Actions' \
--jq '.id')
echo "DEPLOYMENT_ID=$deploymentId" >> $GITHUB_ENV
deploymentId=$(jq -n "{
\"ref\": \"${{ github.event.repository.default_branch }}\",\
\"environment\": \"$FLY_HOSTNAME\",\
\"description\": \"Fly deploy from GitHub Actions\",\
\"required_contexts\": []\
}" \
| gh api repos/${{ github.repository }}/deployments \
--method POST \
--header "Accept: application/vnd.github.v3+json" \
--input - \
--jq '.id')
echo 'DEPLOYMENT_ID='$deploymentId >> $GITHUB_ENV
- name: Deploy to Fly
shell: bash
Expand Down

0 comments on commit 5a84276

Please sign in to comment.