reimplement github action in typescript

This commit is contained in:
Denis Isaev
2020-05-04 16:01:25 +03:00
parent 666cc9164e
commit 853ade09ed
22 changed files with 67641 additions and 49 deletions

View File

@ -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)

View File

@ -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
View 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 }}