build: update actions (#454)

* build: update actions

* .sarif

* rm snyk action
This commit is contained in:
Federico Kunze Küllmer 2021-08-18 04:31:37 -04:00 committed by GitHub
parent 7081b791a7
commit d5e82f1a5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 74 deletions

View File

@ -1,58 +0,0 @@
name: Documentation
on:
# trigger deployment on every push to main branch
push:
branches:
- main
# trigger deployment manually
workflow_dispatch:
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.4
with:
# fetch all commits to get last updated time or other git log info
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v1
with:
# choose node.js version to use
node-version: '14'
# cache node_modules
- name: Cache dependencies
uses: actions/cache@v2
id: yarn-cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
# install dependencies if the cache did not hit
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
# run build script
- name: Build VuePress site
run: yarn docs:build
# please check out the docs of the workflow for more details
# @see https://github.com/crazy-max/ghaction-github-pages
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v2
with:
# deploy to gh-pages branch
target_branch: gh-pages
# deploy the default output dir of VuePress
build_dir: docs/.vuepress/dist
env:
# @see https://docs.github.com/en/actions/reference/authentication-in-a-workflow#about-the-github_token-secret
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,26 +1,27 @@
name: Release
# This workflow helps with creating releases.
# This job will only be triggered when a tag (vX.X.x) is pushed
name: goreleaser
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
- "v*.*.*"
jobs:
release:
goreleaser:
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2.1.3
with:
go-version: 1.16
- name: Unshallow
run: git fetch --prune --unshallow
- name: Create release
uses: goreleaser/goreleaser-action@v2.7.0
submodules: true
- name: Set up Go
uses: actions/setup-go@v2
with:
args: release --rm-dist --release-notes ./RELEASE_CHANGELOG.md
go-version: 1.16.4
- name: release dry run
run: make release-dry-run
- name: setup release environment
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |-
echo 'GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}}' > .release-env
- name: release publish
run: make release

2
go.mod
View File

@ -52,7 +52,7 @@ require (
go.etcd.io/bbolt v1.3.6 // indirect
golang.org/x/crypto v0.0.0-20210813211128-0a44fdfbc16e // indirect
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d // indirect
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect
golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2 // indirect
google.golang.org/genproto v0.0.0-20210816143620-e15ff196659d
google.golang.org/grpc v1.40.0
gopkg.in/yaml.v2 v2.4.0

2
go.sum
View File

@ -1274,6 +1274,8 @@ golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2 h1:c8PlLMqBbOHoqtjteWm5/kbe6rNY2pbRfbIMVnepueo=
golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=