2424 id : lint
2525 continue-on-error : true
2626
27+ - name : Set check status
28+ run : |
29+ if [ "${{ steps.lint.outcome }}" == "success" ]; then
30+ conclusion="success"
31+ else
32+ conclusion="failure"
33+ fi
34+ gh api --method POST /repos/${{ github.repository }}/check-runs \
35+ -f name="Deno Lint" \
36+ -f head_sha="${{ github.sha }}" \
37+ -f status="completed" \
38+ -f conclusion="$conclusion" \
39+ -f output.title="Deno Lint Results" \
40+ -f output.summary="Deno lint completed with $conclusion."
41+
2742 # if ok: build and deploy
2843 - name : Setup Docker Buildx
2944 if : ${{ steps.lint.outcome == 'success' }}
@@ -38,18 +53,19 @@ jobs:
3853 password : ${{ secrets.GITHUB_TOKEN }}
3954
4055 - name : Build and push Docker image
41- if : ${{ steps.lint.outcome == 'success' }}
56+ if : ${{ (github.ref == 'refs/heads/amogus' || github.ref == 'refs/heads/sus') && steps.lint.outcome == 'success' }}
4257 uses : docker/build-push-action@v3
4358 with :
4459 push : true
45- tags : ghcr.io/0d9e-tech/web:latest
60+ tags : ghcr.io/0d9e-tech/web:${{ github.ref == 'refs/heads/amogus' && 'staging' || ' latest' }}
4661 cache-from : type=gha
4762 cache-to : type=gha,mode=max
4863
4964 - name : Deploy
50- if : ${{ github.ref == 'refs/heads/amogus' && steps.lint.outcome == 'success' }}
65+ if : ${{ ( github.ref == 'refs/heads/amogus' || github.ref == 'refs/heads/sus') && steps.lint.outcome == 'success' }}
5166 run : |
52- curl --fail-with-body --no-progress-meter -i https://0d9e.tech/deploy -X POST -H "x-token: ${{ secrets.DEPLOY_TOKEN }}"
67+ curl --fail-with-body --no-progress-meter -i https://0d9e.tech/deploy -X POST \
68+ -H "x-token: ${{ github.ref == 'refs/heads/amogus' && secrets.STAGING_TOKEN || secrets.DEPLOY_TOKEN }}"
5369
5470 # else: revert the commit(s)
5571 - name : Revert commit(s)
0 commit comments