mirror of
https://github.com/woodchen-ink/webp_server_go.git
synced 2025-07-18 13:42:02 +08:00
Optimize release procedure (#94)
* Optimize docker release action * Added ignored-path on CI
This commit is contained in:
parent
74b0382ab6
commit
3890db9077
6
.github/workflows/CI.yaml
vendored
6
.github/workflows/CI.yaml
vendored
@ -1,6 +1,10 @@
|
|||||||
name: CI
|
name: CI check on every push
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
- 'Makefile'
|
||||||
|
- 'config.json'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ci:
|
ci:
|
||||||
|
@ -1,10 +1,14 @@
|
|||||||
|
name: Release Binaries
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
- 'Makefile'
|
||||||
|
- 'config.json'
|
||||||
tags:
|
tags:
|
||||||
- '*'
|
- '*'
|
||||||
|
|
||||||
name: Release Binaries
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Create Release
|
name: Create Release
|
@ -1,8 +1,14 @@
|
|||||||
name: build docker image
|
name: Build and release docker images
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- '**.md'
|
||||||
|
- 'Makefile'
|
||||||
|
- 'config.json'
|
||||||
branches:
|
branches:
|
||||||
- 'master'
|
- 'master'
|
||||||
|
tags:
|
||||||
|
- '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
@ -13,6 +19,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
|
- name: Get the tag name
|
||||||
|
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v1
|
uses: docker/setup-qemu-action@v1
|
||||||
|
|
||||||
@ -46,7 +55,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
string: ${{ github.event.repository.full_name }}
|
string: ${{ github.event.repository.full_name }}
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push latest images
|
||||||
|
if: ${{ github.ref == 'refs/heads/master' }}
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
@ -61,6 +71,22 @@ jobs:
|
|||||||
cache-from: type=local,src=/tmp/.buildx-cache
|
cache-from: type=local,src=/tmp/.buildx-cache
|
||||||
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
|
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
|
||||||
|
|
||||||
|
- name: Build and push tagged images
|
||||||
|
if: ${{ github.ref != 'refs/heads/master' }}
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: linux/arm,linux/amd64,linux/arm64
|
||||||
|
push: true
|
||||||
|
tags: |
|
||||||
|
webpsh/webp_server_go:${{ env.TAG }}
|
||||||
|
webpsh/webp-server-go:${{ env.TAG }}
|
||||||
|
webpsh/webps:${{ env.TAG }}
|
||||||
|
ghcr.io/${{ steps.ghcr_string.outputs.lowercase }}:${{ env.TAG }}
|
||||||
|
|
||||||
|
cache-from: type=local,src=/tmp/.buildx-cache
|
||||||
|
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
|
||||||
|
|
||||||
- name: Move cache
|
- name: Move cache
|
||||||
run: |
|
run: |
|
||||||
rm -rf /tmp/.buildx-cache
|
rm -rf /tmp/.buildx-cache
|
Loading…
x
Reference in New Issue
Block a user