go-org-orgwiki/.github/workflows/ci.yml
Niklas Fasching b9f05878fa Revert "Manually install go 1.16 until github actions updates image"
This reverts commit bf7f957af2.

We still have to manually install it for now but we don't have to fuck around
with env vars anymore. github actions still defaults to go 1.15 [1]. Whatever.

[1]
```
ls -lisah $(which go)
108022 0 lrwxrwxrwx 1 root root 42 Mar 18 22:15 /usr/bin/go ->
/opt/hostedtoolcache/go/1.15.10/x64/bin/go
```
2021-03-28 17:23:05 +02:00

31 lines
942 B
YAML

name: CI
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: git
run: |
git clone --depth 1 "https://x-access-token:${{secrets.GITHUB_TOKEN}}@github.com/${GITHUB_REPOSITORY}" .
git config user.name "GitHub Action"
git config user.email "action@github.com"
git log -1 --format="%H"
- name: go
run: sudo snap install go --classic
- name: test
run: make test
- name: gh-pages
run: |
git checkout --orphan gh-pages && git reset
make generate-gh-pages
git add -f docs/ && git commit -m deploy
git push -f origin gh-pages
- name: notify
if: ${{ failure() }}
run: |
text="https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID} failed"
curl --silent --output /dev/null ${{secrets.TELEGRAM_URL}} -d "chat_id=${{secrets.TELEGRAM_CHAT_ID}}&text=${text}"