mirror of
https://github.com/matrixgpt/matrix-chatgpt-bot.git
synced 2024-09-28 20:15:56 +00:00
Update github actions to use cache and latest tag
This commit is contained in:
parent
8b0062b5f4
commit
938fa728e7
11
.github/workflows/main.yml
vendored
11
.github/workflows/main.yml
vendored
@ -4,9 +4,9 @@ on:
|
|||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- "v*.*.*"
|
- "v*.*.*"
|
||||||
|
branches: [main]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches: [main]
|
||||||
- "main"
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
@ -23,6 +23,7 @@ jobs:
|
|||||||
# list of Docker images to use as base name for tags
|
# list of Docker images to use as base name for tags
|
||||||
images: |
|
images: |
|
||||||
ghcr.io/matrixgpt/matrix-chatgpt-bot
|
ghcr.io/matrixgpt/matrix-chatgpt-bot
|
||||||
|
flavor: latest=true
|
||||||
# generate Docker tags based on the following events/attributes
|
# generate Docker tags based on the following events/attributes
|
||||||
tags: |
|
tags: |
|
||||||
type=schedule
|
type=schedule
|
||||||
@ -51,7 +52,9 @@ jobs:
|
|||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.ref_type == 'tag' }}
|
||||||
tags: ${{ steps.meta.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
platforms: linux/amd64,linux/arm64
|
|
||||||
labels: ${{ steps.meta.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
|
Loading…
Reference in New Issue
Block a user