mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 14:56:07 +08:00
更新action yml
This commit is contained in:
parent
5b76213354
commit
2a1adb2e0e
2
.github/workflows/ build.yml
vendored
2
.github/workflows/ build.yml
vendored
|
@ -1,4 +1,4 @@
|
|||
name: build static
|
||||
name: Build Static
|
||||
|
||||
on:
|
||||
push:
|
||||
|
|
13
.github/workflows/docker.yml
vendored
13
.github/workflows/docker.yml
vendored
|
@ -1,8 +1,9 @@
|
|||
name: Publish Docker Image
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
branches:
|
||||
- v*
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
@ -14,10 +15,8 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
# https://github.com/docker/setup-qemu-action
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
# https://github.com/docker/setup-buildx-action
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
|
@ -35,19 +34,19 @@ jobs:
|
|||
run: |
|
||||
docker buildx build --build-arg SSH_PRIVATE_KEY="${SSH_PRIVATE_KEY}" --output "type=image,push=true" --platform=linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x --tag whyour/qinglong:latest docker/
|
||||
|
||||
- name: Replace tag without `v`
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
- name: Replace branch without `v`
|
||||
if: startsWith(github.ref, 'refs/heads/')
|
||||
uses: actions/github-script@v1
|
||||
id: version
|
||||
with:
|
||||
script: |
|
||||
return context.payload.ref.replace(/\/?refs\/tags\/v/, '')
|
||||
return context.payload.ref.replace(/\/?refs\/heads\/v/, '')
|
||||
result-encoding: string
|
||||
|
||||
- name: Docker buildx image and push on release
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
if: startsWith(github.ref, 'refs/heads/')
|
||||
run: |
|
||||
docker buildx build --build-arg SSH_PRIVATE_KEY="${SSH_PRIVATE_KEY}" --output "type=image,push=true" --platform=linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x --tag whyour/qinglong:${{steps.version.outputs.result}} docker/
|
||||
docker buildx build --build-arg SSH_PRIVATE_KEY="${SSH_PRIVATE_KEY}" --output "type=image,push=true" --platform=linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x --tag whyour/qinglong:latest docker/
|
||||
|
|
Loading…
Reference in New Issue
Block a user