forked from Huawei/eSDK_K8S_Plugin
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Hou Junjie
committed
Jan 5, 2021
1 parent
dfecf26
commit 5e6055d
Showing
3 changed files
with
57 additions
and
18 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,48 @@ | ||
name: csi-huawei image | ||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v*.*.* | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v2 | ||
|
||
- name: login to docker hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKER_HUB_USERNAME }} | ||
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | ||
|
||
- name: set up docker buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Cache Docker layers | ||
uses: actions/cache@v2 | ||
with: | ||
path: /tmp/.buildx-cache | ||
key: ${{ runner.os }}-buildx-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
- id: image_meta | ||
uses: crazy-max/ghaction-docker-meta@v1 | ||
with: | ||
images: $GITHUB_ACTOR/csi-huawei # list of Docker images to use as base name for tags | ||
tag-sha: true # add git short SHA as Docker tag | ||
|
||
- name: build driver | ||
id: docker_build_s3_driver | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./ | ||
file: Dockerfile | ||
push: true | ||
tags: ${{ steps.image_meta.outputs.tags }} | ||
labels: ${{ steps.image_meta.outputs.labels }} |
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,9 @@ | ||
FROM golang:alpine AS builder | ||
|
||
WORKDIR /src | ||
COPY . /src/ | ||
RUN go build -o bin/huawei-csi ./src/csi | ||
|
||
FROM alpine | ||
COPY --from=builder /src/bin/huawei-csi /huawei-csi | ||
ENTRYPOINT [ "/huawei-csi" ] |
This file was deleted.
Oops, something went wrong.