mirror of
https://github.com/logto-io/logto.git
synced 2024-12-30 20:33:54 -05:00
ci: upload image to ghcr (#1228)
This commit is contained in:
parent
4ee775273a
commit
c62200c6f4
2 changed files with 11 additions and 14 deletions
23
.github/workflows/dockerize.yml
vendored
23
.github/workflows/dockerize.yml
vendored
|
@ -6,7 +6,6 @@ on:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: dockerize-${{ github.ref }}
|
group: dockerize-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
dockerize:
|
dockerize:
|
||||||
|
@ -18,15 +17,19 @@ jobs:
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Build and export
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: silverhand-bot
|
||||||
|
password: ${{ secrets.BOT_PAT }}
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v3
|
uses: docker/build-push-action@v3
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
tags: logto
|
push: true
|
||||||
outputs: type=docker,dest=/tmp/logto.tar
|
tags: ghcr.io/logto-io/logto:latest
|
||||||
|
|
||||||
- name: Load image
|
|
||||||
run: docker load -i /tmp/logto.tar
|
|
||||||
|
|
||||||
- name: Compose up
|
- name: Compose up
|
||||||
run: docker compose up -d
|
run: docker compose up -d
|
||||||
|
@ -36,9 +39,3 @@ jobs:
|
||||||
|
|
||||||
- name: Health check
|
- name: Health check
|
||||||
run: curl http://localhost:3001/api/status -If
|
run: curl http://localhost:3001/api/status -If
|
||||||
|
|
||||||
- name: Upload artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: logto.${{ github.sha }}
|
|
||||||
path: /tmp/logto.tar
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ services:
|
||||||
app:
|
app:
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
image: logto:latest
|
image: ghcr.io/logto-io/logto:latest
|
||||||
ports:
|
ports:
|
||||||
- 3001:3001
|
- 3001:3001
|
||||||
environment:
|
environment:
|
||||||
|
|
Loading…
Reference in a new issue