Skip to content

Commit

Permalink
bump Github Action version
Browse files Browse the repository at this point in the history
Signed-off-by: chaunceyjiang <[email protected]>
  • Loading branch information
chaunceyjiang committed Mar 20, 2024
1 parent bf27c46 commit 570ff7a
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 17 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ci-latest.yaml
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
29 changes: 12 additions & 17 deletions .github/workflows/ci.yaml
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:
Expand All @@ -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

0 comments on commit 570ff7a

Please sign in to comment.