Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
Update github actions to use cache and latest tag
Browse files Browse the repository at this point in the history
  • Loading branch information
bertybuttface committed Jan 8, 2023
1 parent 8b0062b commit 938fa72
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
push:
tags:
- "v*.*.*"
branches: [main]
pull_request:
branches:
- "main"
branches: [main]

jobs:
docker:
Expand All @@ -23,6 +23,7 @@ jobs:
# list of Docker images to use as base name for tags
images: |
ghcr.io/matrixgpt/matrix-chatgpt-bot
flavor: latest=true
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
Expand Down Expand Up @@ -51,7 +52,9 @@ jobs:
uses: docker/build-push-action@v3
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
push: ${{ github.ref_type == 'tag' }}
tags: ${{ steps.meta.outputs.tags }}
platforms: linux/amd64,linux/arm64
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit 938fa72

Please sign in to comment.