Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ on:
jobs:
build:
runs-on: ubuntu-latest
container:
image: golang:1.17

steps:
- name: clone
uses: actions/checkout@v3

- name: install go
uses: actions/setup-go@v3
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true

- name: build
run: |
make build
14 changes: 10 additions & 4 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,21 @@ on:
jobs:
prerelease:
runs-on: ubuntu-latest
container:
image: golang:1.17

steps:
- name: clone
uses: actions/checkout@v3
with:
# ensures we fetch tag history for the repository
fetch-depth: 0

- name: install go
uses: actions/setup-go@v3
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true

- name: setup
run: |
# setup git tag in Actions environment
Expand All @@ -33,7 +39,7 @@ jobs:
make build-static-ci

- name: publish
uses: elgohr/Publish-Docker-Github-Action@master
uses: elgohr/Publish-Docker-Github-Action@v4
with:
name: target/vela-worker
cache: true
Expand All @@ -42,7 +48,7 @@ jobs:
password: ${{ secrets.DOCKER_PASSWORD }}

- name: publish-alpine
uses: elgohr/Publish-Docker-Github-Action@master
uses: elgohr/Publish-Docker-Github-Action@v4
with:
name: target/vela-worker
cache: true
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,21 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
container:
image: golang:1.17

steps:
- name: clone
uses: actions/checkout@v3
with:
# ensures we fetch tag history for the repository
fetch-depth: 0

- name: install go
uses: actions/setup-go@v3
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true

- name: build
env:
GOOS: linux
Expand All @@ -27,15 +33,15 @@ jobs:
make build-static-ci

- name: publish
uses: elgohr/Publish-Docker-Github-Action@master
uses: elgohr/Publish-Docker-Github-Action@v4
with:
name: target/vela-worker
cache: true
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: publish-alpine
uses: elgohr/Publish-Docker-Github-Action@master
uses: elgohr/Publish-Docker-Github-Action@v4
with:
name: target/vela-worker
cache: true
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/reviewdog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@ name: reviewdog
on:
pull_request:

# NOTE: We have to specify `go_version: 1.17` because the action was installing 1.18.
# 1.18, in turn, is not fully supported by golangci-lint yet, and it can fail silently:
# see: https://github.com/reviewdog/action-golangci-lint/issues/249

# pipeline to execute
jobs:
diff-review:
Expand All @@ -21,7 +17,6 @@ jobs:
uses: reviewdog/action-golangci-lint@v2
with:
github_token: ${{ secrets.github_token }}
go_version: 1.17.9
golangci_lint_flags: "--config=.golangci.yml --verbose"
fail_on_error: true
filter_mode: diff_context
Expand All @@ -33,11 +28,17 @@ jobs:
- name: clone
uses: actions/checkout@v3

- name: install go
uses: actions/setup-go@v3
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true

- name: golangci-lint
uses: reviewdog/action-golangci-lint@v2
with:
github_token: ${{ secrets.github_token }}
go_version: 1.17.9
golangci_lint_flags: "--config=.golangci.yml --verbose"
fail_on_error: false
filter_mode: nofilter
10 changes: 8 additions & 2 deletions .github/workflows/spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ on:
jobs:
schema:
runs-on: ubuntu-latest
container:
image: golang:1.17

steps:
- name: clone
uses: actions/checkout@v3

- name: install go
uses: actions/setup-go@v3
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true

- name: tags
run: |
git fetch --tags
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ on:
jobs:
test:
runs-on: ubuntu-latest
container:
image: golang:1.17

steps:
- name: clone
uses: actions/checkout@v3

- name: install
run: |
go get github.com/mattn/goveralls
- name: install go
uses: actions/setup-go@v3
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true

- name: test
run: |
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,18 @@ on:
jobs:
validate:
runs-on: ubuntu-latest
container:
image: golang:1.17

steps:
- name: clone
uses: actions/checkout@v3

- name: install go
uses: actions/setup-go@v3
with:
# use version from go.mod file
go-version-file: 'go.mod'
cache: true

- name: validate
run: |
# Check that go mod tidy produces a zero diff; clean up any changes afterwards.
Expand All @@ -29,5 +35,5 @@ jobs:

- name: validate spec
run: |
make spec-install
sudo make spec-install
make spec
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ spec-install:
@apt-get update
@apt-get install -y jq moreutils
@echo "### Downloading and installing go-swagger"
@curl -o /usr/local/bin/swagger -L "https://github.com/go-swagger/go-swagger/releases/download/v0.27.0/swagger_linux_amd64"
@curl -o /usr/local/bin/swagger -L "https://github.com/go-swagger/go-swagger/releases/download/v0.30.2/swagger_linux_amd64"
@chmod +x /usr/local/bin/swagger

# The `spec-gen` target is intended to create an api-spec
Expand Down
2 changes: 1 addition & 1 deletion api/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
//
// Usage:
//
// import "github.com/go-vela/worker/api"
// import "github.com/go-vela/worker/api"
package api
2 changes: 1 addition & 1 deletion executor/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
//
// Usage:
//
// import "github.com/go-vela/worker/executor"
// import "github.com/go-vela/worker/executor"
package executor
2 changes: 1 addition & 1 deletion executor/linux/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
//
// Usage:
//
// import "github.com/go-vela/worker/executor/linux"
// import "github.com/go-vela/worker/executor/linux"
package linux
2 changes: 1 addition & 1 deletion executor/local/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
//
// Usage:
//
// import "github.com/go-vela/worker/executor/local"
// import "github.com/go-vela/worker/executor/local"
package local
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/go-vela/worker

go 1.17
go 1.19

require (
github.com/Masterminds/semver/v3 v3.1.1
Expand Down
Loading