Skip to content

Commit

Permalink
Revert to Docker Hub
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywonchung committed Jun 21, 2023
1 parent 5b40bbc commit 1e65ec5
Showing 1 changed file with 26 additions and 4 deletions.
30 changes: 26 additions & 4 deletions .github/workflows/push_docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,37 @@ on:
- 'Dockerfile'
- 'LICENSE'
- 'setup.py'
- 'pyproject.toml'

jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Build and push image to ghcr.io
uses: jaywonchung/push-to-ghcr@master
- name: Docker Hub login
uses: docker/login-action@v2
with:
image_name: ${{ github.repository }} # it will be lowercased internally
github_token: ${{ secrets.GHCR_PAT }}
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Generate image metadata
id: meta
uses: docker/metadata-action@v4
with:
images: symbioticlab/zeus
tags: |
type=ref,event=branch
type=ref,event=tag
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push to Docker Hub
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=symbioticlab/zeus:buildcache
cache-to: type=registry,ref=symbioticlab/zeus:buildcache,mode=max

0 comments on commit 1e65ec5

Please sign in to comment.