Skip to content

Commit

Permalink
feat(ci): New id step
Browse files Browse the repository at this point in the history
  • Loading branch information
AliaksandrRyzhou committed Apr 30, 2024
1 parent ada07e7 commit b45421e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/rollback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ jobs:
steps:
- run: echo "Rolling back ${{ github.event.inputs.service }} in ${{ github.event.inputs.environment }}"

- id: commit
- id: commit-netlify
if: contains(fromJson('["Commit Hash"]'), github.event.inputs.mode)
uses: prompt/actions-commit-hash@v3

Expand Down Expand Up @@ -271,7 +271,7 @@ jobs:
if: contains(fromJson('["Commit Hash"]'), github.event.inputs.mode)
env:
NETLIFY_SITE_ID: ${{ env.netlify_site_id }}
COMMIT_REF: ${{ steps.commit.outputs.hash }}
COMMIT_REF: ${{ steps.commit-netlify.outputs.hash }}
run: |
response=$(curl -s -H "Authorization: Bearer $NETLIFY_ACCESS_TOKEN" "https://api.netlify.com/api/v1/sites/$NETLIFY_SITE_ID/deploys")
deploy_id=$(echo "$response" | jq -r ".[] | select(.commit_ref == \"$COMMIT_REF\") | .id")
Expand Down

0 comments on commit b45421e

Please sign in to comment.