diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..9bc6868e --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,30 @@ +name: Check +on: + pull_request_target: + branches: + - "master" + - "[0-9]+.[0-9]+.z" + - "[0-9]+.[0-9]+.[0-9]" + - "[0-9]+.[0-9]+.[0-9]+-BETA-[0-9]+" + - "[0-9]+.[0-9]+.[0-9]+-DEVEL-[0-9]+" + - "data-migration-5.3" + types: + - opened + - synchronize + - reopened + - labeled + - unlabeled +jobs: + check_labels: + name: checkMandLabels + runs-on: ubuntu-latest + steps: + - name: Test App + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + echo "VVVVVVVVVV ${{ github.event.pull_request.head.sha }}" + RUNID=$(gh api https://api.github.com/repos/nishaatr/hellogitworld/commits/${{ github.event.pull_request.head.sha }}/check-runs | jq -r '.check_runs[] | select(.name == "checkMandLabels") | .id') + echo "LLLLLLLLL $RUNID" + curl -X PATCH -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/nishaatr/hellogitworld/check-runs/$RUNID" -d '{"name":"XXXXXXXXXXX", "conclusion":"action_required", "output":{"title":"Mighty Readme report","summary":"SUMMARY","text":"TEXT"}}' + python --version diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml new file mode 100644 index 00000000..5261e211 --- /dev/null +++ b/.github/workflows/manual.yml @@ -0,0 +1,34 @@ +name: Report Metrics + +on: + workflow_dispatch: + inputs: + dispatch_id: + description: 'A unique ID provided when dispatching this workflow' + required: false + type: string +jobs: + dispatch-id: + if: github.event_name == 'workflow_dispatch' && github.event.inputs.dispatch_id != '' + runs-on: [ ubuntu-latest ] + steps: + - id: dispatch-id + name: ${{ github.event.inputs.dispatch_id }} + run: echo "💁 The dispatch ID is ${{ github.event.inputs.dispatch_id }}" + report: + name: Slack + runs-on: ubuntu-latest + + steps: + - uses: Addepar/github-metrics@v3.0.0 + with: + github-owner: nishaatr + github-repo: angular5-quickstart + github-token: ${{secrets.GH_TOKEN}} + slack-app-token: ${{secrets.SLACK_TOKEN}} + slack-channel-id: C05CBQ7UXEC + post-to-slack: "true" + log-debug-messages: "true" + - name: Sleep + run: sleep 30s + shell: bash