Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
KubePi
Commits
23ae578a
Commit
23ae578a
authored
3 years ago
by
Aaron3S
Browse files
Options
Download
Email Patches
Plain Diff
feat(ci): 修改 workflows
parent
414eab25
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.github/workflows/dev-workflow.yml
+42
-0
.github/workflows/dev-workflow.yml
.github/workflows/release-workflow.yml
+3
-11
.github/workflows/release-workflow.yml
with
45 additions
and
11 deletions
+45
-11
.github/workflows/dev-workflow.yml
0 → 100644
+
42
-
0
View file @
23ae578a
name
:
Build dev package
on
:
push
:
branches
:
[
master
]
pull_request
:
branches
:
[
master
]
jobs
:
build-and-push-to-dockerhub
:
runs-on
:
ubuntu-latest
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v2
-
name
:
Prepare
id
:
prepare
run
:
|
DOCKER_IMAGE=kubeoperator/kubepi-server
DOCKER_PLATFORMS=linux/amd64
TAG_NAME=${GITHUB_REF#refs/*/}
DOCKER_IMAGE_TAGS="--tag ${DOCKER_IMAGE}:${TAG_NAME} --tag ${DOCKER_IMAGE}:latest"
echo ::set-output name=docker_image::${DOCKER_IMAGE}
echo ::set-output name=version::${TAG_NAME}
echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \
--build-arg VERSION=${TAG_NAME} \
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
--build-arg VCS_REF=${GITHUB_SHA::8} \
${DOCKER_IMAGE_TAGS} .
-
name
:
Set up Docker Buildx
uses
:
crazy-max/ghaction-docker-buildx@v3
-
name
:
Docker Buildx (build)
run
:
|
docker buildx build --output "type=image,push=false" ${{ steps.prepare.outputs.buildx_args }}
-
name
:
Login to DockerHub
uses
:
docker/login-action@v1
with
:
username
:
${{ secrets.DOCKERHUB_USERNAME }}
password
:
${{ secrets.DOCKERHUB_PASSWORD }}
-
name
:
Docker Buildx (push)
run
:
|
docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }}
This diff is collapsed.
Click to expand it.
.github/workflows/
go
.yml
→
.github/workflows/
release-workflow
.yml
+
3
-
11
View file @
23ae578a
name
:
Build production package
name
:
Build production package
on
:
push
:
branches
:
-
"
*"
tags
:
-
"
*"
pull_request
:
branches
:
-
"
*"
tags
:
-
"
*"
release
:
types
:
[
published
]
jobs
:
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help