mirror of
https://github.com/koreanbots/core.git
synced 2025-12-16 06:20:24 +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
|
name: Publish Stable
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: ghcr.io
|
REGISTRY: ghcr.io
|
||||||
@ -27,7 +28,7 @@ jobs:
|
|||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Get metadata for Docker
|
- name: Get metadata for Docker
|
||||||
uses: docker/metadata-action@v4
|
uses: docker/metadata-action@v4
|
||||||
@ -37,7 +38,8 @@ jobs:
|
|||||||
tags: |
|
tags: |
|
||||||
type=raw,value=latest,priority=100
|
type=raw,value=latest,priority=100
|
||||||
type=raw,value=stable,priority=200
|
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'}}
|
type=schedule,pattern={{date 'YYYYMMDD-hhmmss' tz='Asia/Seoul'}}
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
|
|||||||
5
.github/workflows/publish.yml
vendored
5
.github/workflows/publish.yml
vendored
@ -1,6 +1,7 @@
|
|||||||
name: Publish
|
name: Publish
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
push:
|
||||||
|
branches: [master]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
REGISTRY: ghcr.io
|
REGISTRY: ghcr.io
|
||||||
@ -27,7 +28,7 @@ jobs:
|
|||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: ${{ env.REGISTRY }}
|
registry: ${{ env.REGISTRY }}
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Get metadata for Docker
|
- name: Get metadata for Docker
|
||||||
uses: docker/metadata-action@v4
|
uses: docker/metadata-action@v4
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user