update: use unified Docker image for Forgejo registry
This commit is contained in:
parent
799a3ffb15
commit
d78d4a6b66
1 changed files with 7 additions and 30 deletions
37
.github/workflows/docker-publish.yml
vendored
37
.github/workflows/docker-publish.yml
vendored
|
|
@ -16,9 +16,6 @@ jobs:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
|
@ -29,42 +26,22 @@ jobs:
|
||||||
username: ${{ secrets.FORGEJO_USERNAME }}
|
username: ${{ secrets.FORGEJO_USERNAME }}
|
||||||
password: ${{ secrets.FORGEJO_PASSWORD }}
|
password: ${{ secrets.FORGEJO_PASSWORD }}
|
||||||
|
|
||||||
- name: Extract metadata (backend)
|
- name: Extract metadata
|
||||||
id: meta-backend
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: git.khoavo.myds.me/${{ github.repository }}-backend
|
images: git.khoavo.myds.me/vndangkhoa/kv-tube
|
||||||
tags: |
|
tags: |
|
||||||
type=semver,pattern={{version}}
|
type=semver,pattern={{version}}
|
||||||
type=raw,value=latest,enable=${{ github.ref == 'refs/tags/v*' }}
|
type=raw,value=latest,enable=${{ github.ref == 'refs/tags/v*' }}
|
||||||
|
|
||||||
- name: Build and push (backend)
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: ./backend
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: ${{ steps.meta-backend.outputs.tags }}
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
labels: ${{ steps.meta-backend.outputs.labels }}
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
platforms: linux/amd64
|
|
||||||
cache-from: type=gha
|
|
||||||
cache-to: type=gha,mode=max
|
|
||||||
|
|
||||||
- name: Extract metadata (frontend)
|
|
||||||
id: meta-frontend
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: git.khoavo.myds.me/${{ github.repository }}-frontend
|
|
||||||
tags: |
|
|
||||||
type=semver,pattern={{version}}
|
|
||||||
type=raw,value=latest,enable=${{ github.ref == 'refs/tags/v*' }}
|
|
||||||
|
|
||||||
- name: Build and push (frontend)
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: ./frontend
|
|
||||||
push: true
|
|
||||||
tags: ${{ steps.meta-frontend.outputs.tags }}
|
|
||||||
labels: ${{ steps.meta-frontend.outputs.labels }}
|
|
||||||
platforms: linux/amd64
|
platforms: linux/amd64
|
||||||
cache-from: type=gha
|
cache-from: type=gha
|
||||||
cache-to: type=gha,mode=max
|
cache-to: type=gha,mode=max
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue