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
master
arm-test
dev
rest-api
v1.0
v1.1
v1.2
v1.3
v1.4
v1.5
v1.6
v1.6.2
v1.6.1
v1.6.0
v1.5.3
v1.5.2
v1.5.1
v1.5.0
v1.4.2
v1.4.1
v1.4.0
v1.3.0
v1.2.2
v1.2.1
v1.2.0
v1.1.2
v1.1.1
v1.1.0
v1.0.1
v1.0.0
No related merge requests found
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