14
.github/actions/check/Dockerfile
vendored
14
.github/actions/check/Dockerfile
vendored
@@ -1,14 +0,0 @@
|
||||
FROM golangci/golangci-lint:v1.12.5
|
||||
|
||||
RUN apt-get install git
|
||||
|
||||
LABEL "com.github.actions.name"="Check"
|
||||
LABEL "com.github.actions.description"="Run static analysis and unit tests"
|
||||
LABEL "com.github.actions.icon"="check-circle"
|
||||
LABEL "com.github.actions.color"="green"
|
||||
|
||||
COPY "entrypoint.sh" "/entrypoint.sh"
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENV GOFLAGS -mod=vendor
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
12
.github/actions/integration/Dockerfile
vendored
12
.github/actions/integration/Dockerfile
vendored
@@ -1,12 +0,0 @@
|
||||
FROM golangci/golangci-lint:v1.12.5
|
||||
|
||||
LABEL "com.github.actions.name"="Check"
|
||||
LABEL "com.github.actions.description"="Run integration tests"
|
||||
LABEL "com.github.actions.icon"="check-circle"
|
||||
LABEL "com.github.actions.color"="green"
|
||||
|
||||
COPY "entrypoint.sh" "/entrypoint.sh"
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
ENV GOFLAGS -mod=vendor
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
3
.github/actions/integration/entrypoint.sh
vendored
3
.github/actions/integration/entrypoint.sh
vendored
@@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
go test -cover ./actions
|
48
.github/main.workflow
vendored
48
.github/main.workflow
vendored
@@ -1,48 +0,0 @@
|
||||
workflow "check-and-release" {
|
||||
on = "push"
|
||||
resolves = ["release"]
|
||||
}
|
||||
|
||||
action "check" {
|
||||
uses = "./.github/actions/check"
|
||||
}
|
||||
|
||||
action "release-filter" {
|
||||
needs = ["check"]
|
||||
uses = "actions/bin/filter@master"
|
||||
args = "tag 'v*'"
|
||||
}
|
||||
|
||||
# only release on `v*` tags
|
||||
action "release" {
|
||||
needs = ["release-filter"]
|
||||
uses = "docker://goreleaser/goreleaser:v0.98"
|
||||
args = "release"
|
||||
secrets = ["GITHUB_TOKEN"]
|
||||
}
|
||||
|
||||
# local action for `make build`
|
||||
action "build" {
|
||||
uses = "docker://goreleaser/goreleaser:v0.98"
|
||||
args = "--snapshot --rm-dist"
|
||||
secrets = ["SNAPSHOT_VERSION"]
|
||||
}
|
||||
|
||||
# local action for `make vendor`
|
||||
action "vendor" {
|
||||
uses = "docker://golang:1.11.4"
|
||||
args = "go mod vendor"
|
||||
}
|
||||
|
||||
action "integration-tests" {
|
||||
needs = ["check"]
|
||||
uses = "./.github/actions/integration"
|
||||
}
|
||||
|
||||
# local release
|
||||
action "local-release" {
|
||||
needs = ["integration-tests"]
|
||||
uses = "docker://goreleaser/goreleaser:v0.98"
|
||||
args = "release"
|
||||
secrets = ["GITHUB_TOKEN"]
|
||||
}
|
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'
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
golangci-lint run
|
||||
go test -cover -short ./...
|
||||
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