update
This commit is contained in:
parent
1171de80a3
commit
14bb24e33a
@ -16,14 +16,15 @@ jobs:
|
|||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Log in to Gitea registry
|
- name: Log in to Gitea registry
|
||||||
if: ${{ secrets.GITEA_REGISTRY_USERNAME != '' && secrets.GITEA_REGISTRY_PASSWORD != '' }}
|
if: ${{ secrets.REGISTRY_USERNAME != '' && secrets.REGISTRY_PASSWORD != '' }}
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: git.kogami.xyz
|
registry: git.kogami.xyz
|
||||||
username: ${{ secrets.GITEA_REGISTRY_USERNAME }}
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||||
password: ${{ secrets.GITEA_REGISTRY_PASSWORD }}
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||||
|
|
||||||
- name: Build image
|
- name: Build image (with registry cache)
|
||||||
|
if: ${{ secrets.REGISTRY_USERNAME != '' && secrets.REGISTRY_PASSWORD != '' }}
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
@ -34,6 +35,16 @@ jobs:
|
|||||||
cache-from: type=registry,ref=git.kogami.xyz/foglar/matrix-bot:buildcache
|
cache-from: type=registry,ref=git.kogami.xyz/foglar/matrix-bot:buildcache
|
||||||
cache-to: type=registry,ref=git.kogami.xyz/foglar/matrix-bot:buildcache,mode=max
|
cache-to: type=registry,ref=git.kogami.xyz/foglar/matrix-bot:buildcache,mode=max
|
||||||
|
|
||||||
|
- name: Build image (no registry cache)
|
||||||
|
if: ${{ secrets.REGISTRY_USERNAME == '' || secrets.REGISTRY_PASSWORD == '' }}
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
platforms: linux/arm64
|
||||||
|
push: false
|
||||||
|
load: true
|
||||||
|
tags: matrix-bot:latest
|
||||||
|
|
||||||
- name: Run container
|
- name: Run container
|
||||||
env:
|
env:
|
||||||
MATRIX_HOMESERVER: ${{ secrets.MATRIX_HOMESERVER }}
|
MATRIX_HOMESERVER: ${{ secrets.MATRIX_HOMESERVER }}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user