Skip to content

Commit

Permalink
no deploy for csc
Browse files Browse the repository at this point in the history
  • Loading branch information
wanwiset25 committed Jul 3, 2024
1 parent 4f35358 commit 63f6f9d
Showing 1 changed file with 2 additions and 27 deletions.
29 changes: 2 additions & 27 deletions .github/workflows/pr_deploy.yml → .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Build and deploy devnet
name: Build custom branch
on:
pull_request_target:
branches:
- master

jobs:
build_and_deploy:
build:
if: |
( startsWith(github.head_ref, 'feature') ||
startsWith(github.head_ref, 'fix') )
Expand Down Expand Up @@ -49,28 +49,3 @@ jobs:
run: |
docker build . --file docker/Dockerfile --tag ${{ steps.image.outputs.name }}
docker push ${{ steps.image.outputs.name }}
- name: trigger deploy workflow
id: trigger_deploy
run: |
echo "RESPONSE_CODE=$( \
curl -L \
-o response.txt \
-w %{response_code} \
-s \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.CICD_PAT }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/hash-laboratories-au/subnet-deployment/actions/workflows/subnet-deploy.yaml/dispatches \
-d '{"ref":"master", "inputs":{"caller_repo": "${{ steps.branch.outputs.repo }}", "caller_ref": "${{ steps.branch.outputs.branch }}", "caller_sha": "${{ steps.branch.outputs.commit }}"}}' \
)" >> $GITHUB_ENV
- name: Check response fail or success
run: |
cat response.txt
echo "RESPONSE_CODE=${{ env.RESPONSE_CODE }}"
if [ ${{ env.RESPONSE_CODE }} != 204 ]
then
exit 1
fi

0 comments on commit 63f6f9d

Please sign in to comment.