Scheduled post #1117
This file contains 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: ci | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
verify: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3.2.0 | |
with: | |
fetch-depth: 0 | |
- name: Setup Go | |
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0 | |
with: | |
go-version-file: go.mod | |
cache: true | |
- name: ci/pre-init | |
run: | | |
make assets | |
echo "Checking if 'make assets' was ran after adding files..." | |
git diff --exit-code | |
- name: ci/verify | |
run: make verify-gomod | |
- name: Generate a dummy SSH key | |
id: gen-ssh-key | |
run: | | |
ssh-keygen -t ed25519 -f $GITHUB_WORKSPACE/sshkey -q -N "" | |
{ | |
echo 'SSH_PRIVATE_KEY<<EOF' | |
cat $GITHUB_WORKSPACE/sshkey | |
echo EOF | |
} >> $GITHUB_OUTPUT | |
- uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ steps.gen-ssh-key.outputs.SSH_PRIVATE_KEY }} | |
- name: ci/check-style | |
run: make check-style | |
- name: ci/test | |
run: make test |