update vdcu #12
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
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: Go | |
on: | |
push: | |
branches: [ "master" ] | |
tags: | |
- v[0-9]+.[0-9]+.[0-9]+.[0-9]+ | |
- v[0-9]+.[0-9]+.[0-9]+ | |
- v[0-9]+.[0-9]+ | |
pull_request: | |
branches: [ "master" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
- name: Get branch name | |
uses: nelonoel/branch-name@v1.0.1 | |
- name: Docker Login | |
uses: docker/login-action@v3.1.0 | |
with: | |
# Server address of Docker registry. If not set then will default to Docker Hub | |
# registry: 4pdosc | |
# Username used to log against the Docker registry | |
username: ${{ secrets.DOCKERHUB_TOKEN }} | |
# Password or personal access token used to log against the Docker registry | |
password: ${{ secrets.DOCKERHUB_PASSWD }} | |
- run: docker build . -t projecthami/dcu-vgpu-device-plugin:${BRANCH_NAME} | |
- run: docker push projecthami/dcu-vgpu-device-plugin:${BRANCH_NAME} | |