Compare commits
1 commit
050706674a
...
d375d3ac59
| Author | SHA1 | Date | |
|---|---|---|---|
| d375d3ac59 |
1 changed files with 48 additions and 54 deletions
|
|
@ -4,42 +4,36 @@ on:
|
|||
push:
|
||||
branches: [ main, docker ]
|
||||
|
||||
env:
|
||||
# Should speed up builds.
|
||||
CARGO_INCREMENTAL: 0
|
||||
# Should reduce the size of ./target to improve cache load/store.
|
||||
CARGO_PROFILE_TEST_DEBUG: 0
|
||||
|
||||
jobs:
|
||||
docker-backend:
|
||||
name: Build and Push Backend Image
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: https://github.com/docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Forgejo Container Registry
|
||||
uses: https://github.com/docker/login-action@v3
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ gitea.server_url }}
|
||||
username: ${{ gitea.actor }}
|
||||
registry: ${{ forgejo.server_url }}
|
||||
username: ${{ forgejo.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
uses: https://github.com/docker/metadata-action@v5
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ gitea.server_url }}/${{ gitea.repository }}/backend
|
||||
images: ${{ forgejo.server_url }}/${{ forgejo.repository }}/backend
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=sha,prefix={{branch}}-
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
|
||||
- name: Build and push image
|
||||
uses: https://github.com/docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./backend
|
||||
push: true
|
||||
|
|
@ -53,30 +47,30 @@ jobs:
|
|||
runs-on: docker
|
||||
steps:
|
||||
- name: Checkout Repo
|
||||
uses: https://github.com/actions/checkout@v4
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: https://github.com/docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Forgejo Container Registry
|
||||
uses: https://github.com/docker/login-action@v3
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ gitea.server_url }}
|
||||
username: ${{ gitea.actor }}
|
||||
registry: ${{ forgejo.server_url }}
|
||||
username: ${{ forgejo.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
uses: https://github.com/docker/metadata-action@v5
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ gitea.server_url }}/${{ gitea.repository }}/frontend
|
||||
images: ${{ forgejo.server_url }}/${{ forgejo.repository }}/frontend
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=sha,prefix={{branch}}-
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
|
||||
- name: Build and push image
|
||||
uses: https://github.com/docker/build-push-action@v5
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: ./frontend
|
||||
push: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue