2021-08-17 22:19:59 +00:00
|
|
|
name: Publish Docker image
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
push_to_registry:
|
2021-08-17 22:26:11 +00:00
|
|
|
name: Push Docker image
|
2021-08-17 22:19:59 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2021-08-17 22:26:11 +00:00
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2021-08-17 22:31:19 +00:00
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v1
|
2021-08-17 22:26:11 +00:00
|
|
|
|
2021-08-17 22:19:59 +00:00
|
|
|
- name: Log in to Docker Hub
|
|
|
|
uses: docker/login-action@v1
|
|
|
|
with:
|
|
|
|
username: milesial
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
|
|
|
|
- name: Log in to the Container registry
|
|
|
|
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
|
|
|
|
with:
|
|
|
|
registry: ghcr.io
|
2021-08-17 22:31:19 +00:00
|
|
|
username: ${{ github.repository_owner }}
|
2021-08-17 22:19:59 +00:00
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Extract metadata (tags, labels) for Docker
|
|
|
|
id: meta
|
|
|
|
uses: docker/metadata-action@v3
|
|
|
|
with:
|
|
|
|
images: milesial/unet
|
|
|
|
|
|
|
|
- name: Build and push Docker image
|
|
|
|
id: docker_build
|
2021-08-17 22:31:19 +00:00
|
|
|
uses: docker/build-push-action@v2
|
2021-08-17 22:19:59 +00:00
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: true
|
2021-08-17 22:26:11 +00:00
|
|
|
tags: |
|
2021-08-17 22:31:19 +00:00
|
|
|
milesial/unet:latest
|
|
|
|
ghcr.io/milesial/pytorch-unet:latest
|