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:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'Makefile'
|
||||
- 'config.json'
|
||||
|
||||
jobs:
|
||||
ci:
|
||||
|
@ -1,10 +1,14 @@
|
||||
name: Release Binaries
|
||||
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'Makefile'
|
||||
- 'config.json'
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
name: Release Binaries
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Create Release
|
@ -1,8 +1,14 @@
|
||||
name: build docker image
|
||||
name: Build and release docker images
|
||||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- 'Makefile'
|
||||
- 'config.json'
|
||||
branches:
|
||||
- 'master'
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
docker:
|
||||
@ -13,6 +19,9 @@ jobs:
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Get the tag name
|
||||
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
@ -46,7 +55,8 @@ jobs:
|
||||
with:
|
||||
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
|
||||
with:
|
||||
context: .
|
||||
@ -61,6 +71,22 @@ jobs:
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
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
|
||||
run: |
|
||||
rm -rf /tmp/.buildx-cache
|
Loading…
x
Reference in New Issue
Block a user