github.com/nginxinc/kubernetes-ingress@v1.12.5/.github/workflows/fossa.yml (about) 1 name: Fossa 2 3 on: 4 push: 5 branches: 6 - master 7 paths-ignore: 8 - 'docs/**' 9 - 'docs-web/**' 10 - 'examples/**' 11 - 'examples-of-custom-resources/**' 12 - '**.md' 13 14 jobs: 15 16 scan: 17 name: Fossa 18 runs-on: ubuntu-20.04 19 steps: 20 - name: Checkout Repository 21 uses: actions/checkout@v2 22 - name: Scan 23 uses: fossas/fossa-action@v1 24 with: 25 api-key: ${{ secrets.FOSSA_TOKEN }} 26 27 notify: 28 name: Notify 29 runs-on: ubuntu-20.04 30 needs: scan 31 if: always() 32 steps: 33 - name: Workflow Status 34 id: check 35 uses: martialonline/workflow-status@v2 36 - name: Output Variables 37 id: commit 38 run: | 39 echo "::set-output name=sha::$(echo ${GITHUB_SHA} | cut -c1-7)" 40 echo "::set-output name=repo::$(echo ${GITHUB_REPOSITORY} | cut -d '/' -f 2)" 41 - name: Send Notification 42 uses: 8398a7/action-slack@v3 43 if: steps.check.outputs.status == 'failure' 44 with: 45 status: custom 46 custom_payload: | 47 { 48 username: 'Fossa Scan', 49 icon_emoji: ':fossa:', 50 mention: 'channel', 51 attachments: [{ 52 title: '${{ steps.commit.outputs.repo }} ${{ github.workflow }} license scan has failed', 53 color: 'danger', 54 fields: [{ 55 title: 'Commit Hash', 56 value: '${{ steps.commit.outputs.sha }}', 57 short: true 58 }, 59 { 60 title: 'Author', 61 value: '${{ github.actor }}', 62 short: true 63 }, 64 { 65 title: 'Job URL', 66 value: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}', 67 short: false 68 }] 69 }] 70 } 71 env: 72 GITHUB_TOKEN: ${{ github.token }} 73 SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}