mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-09-10 12:23:22 +08:00
Create docker-ghcr.yml
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
name: Publish a Docker image to ghcr.io
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- run: echo "REPO=${GITHUB_REPOSITORY,,}" >> $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 }}:latest
|
||||
Reference in New Issue
Block a user