Skip to content

.github: Bump ruby/action-slack from 3.2.1 to 3.2.2 #668

.github: Bump ruby/action-slack from 3.2.1 to 3.2.2

.github: Bump ruby/action-slack from 3.2.1 to 3.2.2 #668

Workflow file for this run

on: [push, pull_request]
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.18.x]
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
env:
GOPRIVATE: namespacelabs.dev/*
NSL_GH_SERVICE: ${{ secrets.NSL_GH_SERVICE }}
steps:
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v3
with:
path: main
- name: Setup cross-invocation caching
uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Configure Git
run: git config --global url.https://x-access-token:[email protected]/.insteadOf https://github.com/
- name: Test
run: cd ./main && go test ./...
- uses: ruby/[email protected]
with:
payload: |
{
"attachments": [{
"title": "${{ job.status }}: ${{ github.workflow }}",
"title_link": "https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks",
"text": "${{ github.repository }}@${{ github.ref }}: <https://github.com/${{ github.repository }}/commit/${{ github.sha }}|${{ github.sha }}>",
"fields": [{ "value": ${{ toJson(github.event.head_commit.message) }}, "short": false }],
"footer": "${{ github.event.head_commit.committer.name }} at ${{ github.event.head_commit.timestamp }}",
"color": "danger"
}]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
if: failure() && github.ref_name == 'main'