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 7d40d18
Showing
2 changed files
with
68 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,24 @@ | ||
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,44 @@ | ||
name: Publish | ||
run-name: Publishing "${{ github.event.workflow_run.head_commit.message }}" | ||
|
||
on: | ||
workflow_run: | ||
workflows: [CI] | ||
branches: [aj-main] | ||
types: [completed] | ||
|
||
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: | ||
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: Login to Docker Hub | ||
# uses: docker/login-action@v2 | ||
# with: | ||
# username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
# password: ${{ secrets.DOCKER_HUB_TOKEN }} | ||
# - name: Publish image | ||
# run: make docker-image-publish | ||
# env: | ||
# REGISTRY: 'hub.docker.com' | ||
# REGISTRY_NAMESPACE: 'atomicjar' |