-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: chaunceyjiang <[email protected]>
- Loading branch information
1 parent
bf27c46
commit 570ff7a
Showing
2 changed files
with
54 additions
and
17 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,42 @@ | ||
name: latest image to DockerHub | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
env: | ||
GO_VERSION: "1.21.6" | ||
|
||
jobs: | ||
build: | ||
name: build-dev-image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
# Number of commits to fetch. 0 indicates all history for all branches and tags. | ||
# We need to guess version via git tags. | ||
fetch-depth: 0 | ||
- name: Checkout submodule | ||
uses: Mushus/[email protected] | ||
with: | ||
basePath: # optional, default is . | ||
submodulePath: libvgpu | ||
|
||
- name: Setup Go environment | ||
uses: actions/[email protected] | ||
with: | ||
go-version: 1.21 | ||
|
||
- name: Docker Login | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_TOKEN }} | ||
password: ${{ secrets.DOCKERHUB_PASSWD }} | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- run: make tidy | ||
- run: SHORT_VERSION="dev" bash ./hack/build.sh |
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 |
---|---|---|
@@ -1,24 +1,22 @@ | ||
name: CI | ||
name: CI Workflow | ||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
push: | ||
branches: ['master'] | ||
pull_request: | ||
|
||
env: | ||
GO_VERSION: "1.21.6" | ||
|
||
jobs: | ||
build: | ||
name: build-dev-image | ||
name: build-pr-image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
uses: actions/checkout@v3 | ||
with: | ||
# Number of commits to fetch. 0 indicates all history for all branches and tags. | ||
# We need to guess version via git tags. | ||
fetch-depth: 0 | ||
- name: Checkout submodule | ||
uses: Mushus/[email protected] | ||
with: | ||
|
@@ -30,22 +28,19 @@ jobs: | |
with: | ||
go-version: 1.21 | ||
|
||
- name: Get branch name | ||
uses: nelonoel/[email protected] | ||
|
||
- name: Docker Login | ||
uses: docker/[email protected] | ||
with: | ||
username: ${{ secrets.DOCKERHUB_TOKEN }} | ||
password: ${{ secrets.DOCKERHUB_PASSWD }} | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Generating image tag | ||
id: runtime-tag | ||
run: | | ||
echo tag="$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- run: make tidy | ||
- run: SHORT_VERSION=${{ steps.runtime-tag.outputs.tag }} bash ./hack/build.sh |