forked from kubermatic/machine-controller
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d69e4e9
commit c06d3c6
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ aj-main ] | ||
pull_request: | ||
branches: [ aj-main ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
# depth 0 makes the whole history checked out, and without it the build and tests differ, because default | ||
# depth of 1 might easily fetch a non-tagged commit, hence the version isn't semantic but commit has only | ||
fetch-depth: 0 | ||
- name: Print version tag | ||
run: git describe --tags --dirty=-dirty --always | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
cache-dependency-path: go.sum | ||
go-version-file: go.mod | ||
- name: Run unit tests | ||
run: make test-unit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: Publish | ||
run-name: Publishing ${{ github.event.workflow_run.head_commit.message }} | ||
|
||
on: | ||
workflow_run: | ||
workflows: [ CI ] | ||
types: [ completed ] | ||
branches: [ aj-main ] | ||
|
||
jobs: | ||
on-success: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
steps: | ||
- run: echo 'The triggering workflow passed' | ||
on-failure: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'failure' }} | ||
steps: | ||
- run: echo 'The triggering workflow failed' | ||
publish: | ||
runs-on: ubuntu-latest | ||
needs: [ on-success ] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
# depth 0 makes the whole history checked out, and without it the build and tests differ, because default | ||
# depth of 1 might easily fetch a non-tagged commit, hence the version isn't semantic but commit has only | ||
fetch-depth: 0 | ||
- name: Print version tag | ||
run: git describe --tags --dirty=-dirty --always | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
cache-dependency-path: go.sum | ||
go-version-file: go.mod | ||
- name: Build project | ||
run: make |