mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-06 17:00:30 +08:00
33 lines
912 B
YAML
33 lines
912 B
YAML
name: Publish a Docker image to ghcr.io
|
|
on:
|
|
release:
|
|
types:
|
|
- published
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: echo "REPO=${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
|
|
- run: echo "TAG=${GITHUB_REF##*/}" >> $GITHUB_ENV
|
|
- name: Enable buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
- name: Login
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
- name: Docker build/push
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: ghcr.io/${{ env.REPO }}:${{ env.TAG }}
|
|
- name: Docker build/push
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: ghcr.io/${{ env.REPO }}:latest
|