0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-30 20:33:54 -05:00

ci: fix test tag (#1368)

This commit is contained in:
Gao Sun 2022-07-02 17:00:14 +08:00 committed by GitHub
parent 90efa6fe96
commit c7776eb0fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -10,6 +10,9 @@ on:
concurrency: concurrency:
group: dockerize-${{ github.ref }} group: dockerize-${{ github.ref }}
env:
IMAGE: ghcr.io/logto-io/logto
jobs: jobs:
dockerize: dockerize:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -24,7 +27,7 @@ jobs:
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: | images: |
ghcr.io/logto-io/logto ${{ env.IMAGE }}
tags: | tags: |
type=semver,pattern={{version}} type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}}.{{minor}}
@ -48,9 +51,16 @@ jobs:
push: true push: true
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
- name: Build and export to Docker
uses: docker/build-push-action@v3
with:
context: .
load: true
tags: ${{ env.IMAGE }}:test
- name: Compose up - name: Compose up
run: TAG=${{ steps.meta.outputs.tags[0] }} docker compose up -d run: TAG=test docker compose up -d
- name: Sleep for 30 seconds - name: Sleep for 30 seconds
run: sleep 30s run: sleep 30s
@ -76,4 +86,5 @@ jobs:
- name: Release - name: Release
uses: softprops/action-gh-release@v1 uses: softprops/action-gh-release@v1
with: with:
token: ${{ secrets.BOT_PAT }}
files: /tmp/logto.tar.gz files: /tmp/logto.tar.gz