31
.github/workflows/basic.yml
vendored
31
.github/workflows/basic.yml
vendored
@@ -1,31 +0,0 @@
|
||||
name: basic
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
action:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: node:10.16-jessie
|
||||
env:
|
||||
NODE_ENV: development
|
||||
steps:
|
||||
- run: env
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build]
|
||||
steps:
|
||||
- run: cp $GITHUB_EVENT_PATH $HOME/foo.json
|
||||
- run: ls $HOME
|
||||
- run: cat $HOME/foo.json
|
||||
- uses: docker://alpine:3.8
|
||||
with:
|
||||
args: uname -a
|
||||
local-action:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: ./.github/workflows/docker-url
|
||||
|
9
.github/workflows/check/Dockerfile
vendored
Normal file
9
.github/workflows/check/Dockerfile
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
FROM golangci/golangci-lint:v1.23.6
|
||||
|
||||
RUN apt-get install git
|
||||
|
||||
COPY "entrypoint.sh" "/entrypoint.sh"
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENV GOFLAGS -mod=vendor
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
8
.github/workflows/check/action.yml
vendored
Normal file
8
.github/workflows/check/action.yml
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
name: Check
|
||||
description: Run static analysis and unit tests
|
||||
branding:
|
||||
icon: check-circle
|
||||
color: green
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
4
.github/workflows/check/entrypoint.sh
vendored
Normal file
4
.github/workflows/check/entrypoint.sh
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
golangci-lint run
|
||||
go test -cover -short ./...
|
16
.github/workflows/docker-url/action.yml
vendored
16
.github/workflows/docker-url/action.yml
vendored
@@ -1,16 +0,0 @@
|
||||
name: docker-url
|
||||
author: nektos
|
||||
description: testing
|
||||
inputs:
|
||||
who-to-greet:
|
||||
description: who to greet
|
||||
required: true
|
||||
default: World
|
||||
runs:
|
||||
using: docker
|
||||
image: docker://alpine:3.8
|
||||
env:
|
||||
TEST: enabled
|
||||
args:
|
||||
- echo
|
||||
- ${INPUT_WHO_TO_GREET}
|
7
.github/workflows/integration/Dockerfile
vendored
Normal file
7
.github/workflows/integration/Dockerfile
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
FROM golangci/golangci-lint:v1.23.6
|
||||
|
||||
COPY "entrypoint.sh" "/entrypoint.sh"
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENV GOFLAGS -mod=vendor
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
8
.github/workflows/integration/action.yml
vendored
Normal file
8
.github/workflows/integration/action.yml
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
name: Check
|
||||
description: Run integration tests
|
||||
branding:
|
||||
icon: check-circle
|
||||
color: green
|
||||
runs:
|
||||
using: 'docker'
|
||||
image: 'Dockerfile'
|
3
.github/workflows/integration/entrypoint.sh
vendored
Normal file
3
.github/workflows/integration/entrypoint.sh
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
go test -cover ./runner
|
9
.github/workflows/push.yml
vendored
Normal file
9
.github/workflows/push.yml
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
name: push
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: ./.github/workflows/check
|
||||
- uses: ./.github/workflows/integration
|
20
.github/workflows/tag.yml
vendored
Normal file
20
.github/workflows/tag.yml
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
name: tag
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: ./.github/workflows/check
|
||||
- uses: ./.github/workflows/integration
|
||||
- uses: goreleaser/goreleaser-action@v1
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v1
|
||||
with:
|
||||
version: latest
|
||||
args: release --rm-dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
Reference in New Issue
Block a user