mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 06:10:22 +00:00
chore: build docker image automatically (#604)
* chore: build docker image automatically * chore: add semver tag * fix: get tag from release
This commit is contained in:
parent
04255b52d9
commit
ef7ea1bed7
8
.github/workflows/publish-stable.yml
vendored
8
.github/workflows/publish-stable.yml
vendored
@ -1,6 +1,7 @@
|
||||
name: Publish Stable
|
||||
on:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
@ -27,7 +28,7 @@ jobs:
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Get metadata for Docker
|
||||
uses: docker/metadata-action@v4
|
||||
@ -37,7 +38,8 @@ jobs:
|
||||
tags: |
|
||||
type=raw,value=latest,priority=100
|
||||
type=raw,value=stable,priority=200
|
||||
type=sha,prefix=,suffix=,format=short,priority=300
|
||||
type=semver,pattern={{version}},value=$GITHUB_REF_NAME,priority=300
|
||||
type=sha,prefix=,suffix=,format=short,priority=400
|
||||
type=schedule,pattern={{date 'YYYYMMDD-hhmmss' tz='Asia/Seoul'}}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v4
|
||||
|
||||
5
.github/workflows/publish.yml
vendored
5
.github/workflows/publish.yml
vendored
@ -1,6 +1,7 @@
|
||||
name: Publish
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
@ -27,7 +28,7 @@ jobs:
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Get metadata for Docker
|
||||
uses: docker/metadata-action@v4
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user