diff --git a/.github/workflows/dev-preview.yml b/.github/workflows/dev-preview.yml index 26459cdf..56fd1a81 100644 --- a/.github/workflows/dev-preview.yml +++ b/.github/workflows/dev-preview.yml @@ -62,65 +62,68 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PR_NUMBER: ${{ github.event.issue.number }} + + - name: Debug branch name + run: echo "GOT BRANCH NAME: ${{ steps.getBranchName.outputs.branch_name }}" - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} + # - name: Login to GitHub Container Registry + # uses: docker/login-action@v3 + # with: + # registry: ghcr.io + # username: ${{ github.repository_owner }} + # password: ${{ secrets.GITHUB_TOKEN }} - # Docker build setup - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + # # Docker build setup + # - name: Set up QEMU + # uses: docker/setup-qemu-action@v3 + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v3 - - name: Build and push image [oss] - uses: docker/build-push-action@v5 - with: - file: Dockerfile.oss - context: . - push: true - platforms: linux/amd64,linux/arm64 - provenance: false - tags: | - ghcr.io/${{ github.repository }}/nginx-oss-s3-gateway-dev:${{ steps.getBranchName.outputs.branch_name }} + # - name: Build and push image [oss] + # uses: docker/build-push-action@v5 + # with: + # file: Dockerfile.oss + # context: . + # push: true + # platforms: linux/amd64,linux/arm64 + # provenance: false + # tags: | + # ghcr.io/${{ github.repository }}/nginx-oss-s3-gateway-dev:${{ steps.getBranchName.outputs.branch_name }} - - name: Final Comment - run: | - gh api graphql --silent --raw-field query="mutation AddReaction {addReaction(input:{subjectId:\"$NODE_ID\",content:THUMBS_UP}){reaction{content}subject{id}}}" - gh api graphql --silent --raw-field query="mutation RemoveReaction {removeReaction(input:{subjectId:\"$NODE_ID\",content:EYES}){reaction{content}subject{id}}}" - ( - echo "**${{ github.workflow }}**" - echo "The long task is done!" - echo - echo "You can find the workflow here:" - echo "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" - ) | \ - gh pr comment "${PR_NUMBER}" --repo ${{ github.repository }} -F - - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR_NUMBER: ${{ github.event.issue.number }} - NODE_ID: ${{ github.event.comment.node_id }} + # - name: Final Comment + # run: | + # gh api graphql --silent --raw-field query="mutation AddReaction {addReaction(input:{subjectId:\"$NODE_ID\",content:THUMBS_UP}){reaction{content}subject{id}}}" + # gh api graphql --silent --raw-field query="mutation RemoveReaction {removeReaction(input:{subjectId:\"$NODE_ID\",content:EYES}){reaction{content}subject{id}}}" + # ( + # echo "**${{ github.workflow }}**" + # echo "The long task is done!" + # echo + # echo "You can find the workflow here:" + # echo "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + # ) | \ + # gh pr comment "${PR_NUMBER}" --repo ${{ github.repository }} -F - + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # PR_NUMBER: ${{ github.event.issue.number }} + # NODE_ID: ${{ github.event.comment.node_id }} - notify-job: - runs-on: ubuntu-22.04 - needs: [build-and-push-dev-container] - if: ${{ always() && contains(needs.*.result, 'failure') }} <-- check that status of the previous job - steps: - - name: Notify on Failure - run: | - gh api graphql --silent --raw-field query="mutation AddReaction {addReaction(input:{subjectId:\"$NODE_ID\",content:THUMBS_DOWN}){reaction{content}subject{id}}}" - gh api graphql --silent --raw-field query="mutation RemoveReaction {removeReaction(input:{subjectId:\"$NODE_ID\",content:EYES}){reaction{content}subject{id}}}" - ( - echo "**${{ github.workflow }}**" - echo "**Something went wrong!**" - echo - echo "**Details:** ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" - ) | \ - gh pr comment "${PR_NUMBER}" --repo ${{ github.repository }} -F - - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR_NUMBER: ${{ github.event.issue.number }} - NODE_ID: ${{ github.event.comment.node_id }} + # notify-job: + # runs-on: ubuntu-22.04 + # needs: [build-and-push-dev-container] + # if: ${{ always() && contains(needs.*.result, 'failure') }} <-- check that status of the previous job + # steps: + # - name: Notify on Failure + # run: | + # gh api graphql --silent --raw-field query="mutation AddReaction {addReaction(input:{subjectId:\"$NODE_ID\",content:THUMBS_DOWN}){reaction{content}subject{id}}}" + # gh api graphql --silent --raw-field query="mutation RemoveReaction {removeReaction(input:{subjectId:\"$NODE_ID\",content:EYES}){reaction{content}subject{id}}}" + # ( + # echo "**${{ github.workflow }}**" + # echo "**Something went wrong!**" + # echo + # echo "**Details:** ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + # ) | \ + # gh pr comment "${PR_NUMBER}" --repo ${{ github.repository }} -F - + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # PR_NUMBER: ${{ github.event.issue.number }} + # NODE_ID: ${{ github.event.comment.node_id }}