From e6f0e3e31022ea58bbce79f49b3c91910f296114 Mon Sep 17 00:00:00 2001 From: Javier Evans Date: Mon, 26 Feb 2024 14:22:14 -0800 Subject: [PATCH] debug: remove debug --- .github/workflows/dev-preview.yml | 114 +++++++++++++++--------------- 1 file changed, 57 insertions(+), 57 deletions(-) diff --git a/.github/workflows/dev-preview.yml b/.github/workflows/dev-preview.yml index 56fd1a81..043e76e0 100644 --- a/.github/workflows/dev-preview.yml +++ b/.github/workflows/dev-preview.yml @@ -66,64 +66,64 @@ jobs: - 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 }}