justlog/.github/workflows/ci.yml

50 lines
1.1 KiB
YAML
Raw Normal View History

2020-06-01 16:17:02 +02:00
name: ci
2020-11-18 17:40:05 +01:00
env:
SHORTSHA: $(git rev-parse --short=4 ${{ github.sha }})
2020-06-01 16:14:03 +02:00
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
2020-11-18 17:40:05 +01:00
2020-06-01 16:14:03 +02:00
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Build
run: go build -v .
- name: Test
run: go test -v .
2020-11-18 16:49:23 +01:00
release:
2020-11-18 16:54:40 +01:00
if: ${{ github.ref == 'refs/heads/master' }}
2020-11-18 16:50:40 +01:00
runs-on: ubuntu-latest
2020-11-18 16:49:23 +01:00
needs: build
2020-11-18 16:50:06 +01:00
steps:
2020-11-18 16:49:23 +01:00
- name: trigger update
run: |
2020-11-18 17:21:14 +01:00
curl -H "x-auth: ${{ secrets.UPDATE_KEY }}" ${{ secrets.UPDATE_URL }}
- name: announce update
run: |
2020-11-18 17:40:05 +01:00
echo -en "PASS ${{ secrets.TMI_TOKEN }}\r\nNICK gempbot\r\nPRIVMSG #pajlada :nymnLander ${{ github.event.head_commit.message }} https://github.com/gempir/justlog/commit/$SHORTSHA | justlog update\r\n" | openssl s_client -connect irc.chat.twitch.tv:6697