reimplement github action in typescript
This commit is contained in:
11
.github/workflows/dockerimage.yml
vendored
11
.github/workflows/dockerimage.yml
vendored
@ -1,11 +0,0 @@
|
||||
name: docker image
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Build the Docker image
|
||||
run: docker build . --file Dockerfile --tag golangci-lint-action:$(date +%s)
|
14
.github/workflows/golangci.yml
vendored
14
.github/workflows/golangci.yml
vendored
@ -1,14 +0,0 @@
|
||||
name: golangci
|
||||
on: [pull_request]
|
||||
jobs:
|
||||
golangci-lint-dockerfile:
|
||||
name: lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: golangci-lint
|
||||
uses: ./
|
||||
with:
|
||||
directory: sample
|
||||
format: colored-line-number
|
||||
flags: --issues-exit-code 0
|
27
.github/workflows/test.yml
vendored
Normal file
27
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
name: "build-test"
|
||||
on: # rebuild any PRs and main branch changes
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- 'releases/*'
|
||||
|
||||
jobs:
|
||||
build: # make sure build/ci work properly
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- run: |
|
||||
npm install
|
||||
npm run prepare-deps
|
||||
npm run all
|
||||
git diff && git diff --cached
|
||||
test: # make sure the action works on a clean machine without building
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: ./
|
||||
with:
|
||||
version: v1.26
|
||||
args: --issues-exit-code=0 ./sample/...
|
||||
github-token: ${{ secrets.GOLANGCI_LINT_GITHUB_TOKEN }}
|
Reference in New Issue
Block a user