Skip to content

Commit

Permalink
dev(narugo): use dockerhub
Browse files Browse the repository at this point in the history
  • Loading branch information
narugo1992 committed Dec 9, 2024
1 parent a6519a2 commit 5985190
Showing 1 changed file with 27 additions and 18 deletions.
45 changes: 27 additions & 18 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,33 @@
name: Publish Image
name: Build and Push Docker Image

on:
- push
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
publish-image:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/[email protected]
with:
fetch-depth: 20
submodules: 'recursive'
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the runpod-template-pytorch2 Docker image
run: |
docker build . --tag ghcr.io/deepghs/pytorch-conda-image:latest
docker push ghcr.io/deepghs/pytorch-conda-image:latest
- uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: narugo1992
password: ${{ secrets.DCR_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: narugo1992/pytorch-conda-image:latest

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit 5985190

Please sign in to comment.