Skip to content

Commit

Permalink
Update docker-image.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
wayneliu0019 authored and Rader committed Jul 17, 2024
1 parent 4508274 commit 86c91b0
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,31 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Extract version tag
id: extract_tag
run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV

- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Log in to ACR
uses: docker/login-action@v2
with:
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
registry: ${{ secrets.ACR_REGISTRY }}

- name: Extract Docker metadata (tags, labels)
id: meta
uses: docker/metadata-action@v4
with:
images: |
opencsg/csghub-server
${{ secrets.ACR_REGISTRY }}/opencsg_public/csghub_server
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./docker/Dockerfile
push: true
tags: opencsg/csghub-server:${{ env.TAG }}
tags: ${{ steps.meta.outputs.tags }}

0 comments on commit 86c91b0

Please sign in to comment.