Refactor: dependencies (#3942) #1757
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: master | |
| on: | |
| push: | |
| branches: | |
| - master | |
| permissions: {} | |
| env: | |
| TESTCONTAINERS_RYUK_DISABLED: true | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd | |
| - uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 | |
| with: | |
| # https://www.npmjs.com/package/semver#caret-ranges-123-025-004 | |
| go-version: "^1.23" | |
| check-latest: true | |
| - run: go version | |
| - run: make deps | |
| - run: make check-fmt | |
| - run: make vet | |
| - run: make staticcheck | |
| - run: make osv-scanner | |
| - run: make govulncheck | |
| - run: make check-race | |
| - run: make capslock | |
| - run: make coverprofile | |
| - name: Convert coverage to lcov | |
| uses: jandelgado/gcov2lcov-action@e4612787670fc5b5f49026b8c29c5569921de1db | |
| - name: Coveralls | |
| uses: coverallsapp/github-action@5cbfd81b66ca5d10c19b062c04de0199c215fb6e | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| path-to-lcov: coverage.lcov | |
| alert-on-failure: | |
| runs-on: ubuntu-latest | |
| needs: [tests] | |
| if: ${{ failure() }} | |
| steps: | |
| - id: failed-name | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: echo NAME=$(gh api /repos/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/jobs | jq -r '.jobs[0].steps[]|select(.conclusion == "failure")|.name') >> "$GITHUB_OUTPUT" | |
| - id: job-id | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: echo ID=$(gh api /repos/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/jobs | jq -r '.jobs[0].id') >> "$GITHUB_OUTPUT" | |
| - id: thread-key | |
| run: echo KEY=$(date +"%d-%m-%y") >> "$GITHUB_OUTPUT" | |
| - run: >- | |
| curl | |
| -H 'content-type:application/json' | |
| "${{ secrets.INTERNAL_CHAT_WEBHOOK }}" | |
| -d "{ | |
| \"thread\": { | |
| \"threadKey\": \"${{ steps.thread-key.outputs.KEY }}\" | |
| }, | |
| \"cardsV2\": [ | |
| { | |
| \"cardId\": \"skipper-failing-pipeline\", | |
| \"card\": { | |
| \"header\": { | |
| \"title\": \"Build Failed\", | |
| \"imageUrl\": \"https://raw.githubusercontent.com/zalando/skipper/master/img/skipper-h180.png\", | |
| \"imageType\": \"CIRCLE\" | |
| }, | |
| \"sections\": [ | |
| { | |
| \"header\": \"Failed Step: ${{ steps.failed-name.outputs.NAME }}\", | |
| \"collapsible\": false, | |
| \"widgets\": [ | |
| { | |
| \"buttonList\": { | |
| \"buttons\": [ | |
| { | |
| \"text\": \"View Build Logs\", | |
| \"onClick\": { | |
| \"openLink\": { | |
| \"url\": \"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID/job/${{ steps.job-id.outputs.ID}}\" | |
| } | |
| } | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| }" |