Skip to content

Commit

Permalink
Push to both ghcr and private repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ustc-zzzz authored Jul 12, 2024
1 parent 16e8559 commit bc2c947
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,30 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Login to the Container Registry
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Private Container Registry
uses: docker/[email protected]
with:
registry: ${{ secrets.TEACON_REGISTRY }}
username: ${{ secrets.TEACON_REGISTRY_USERNAME }}
password: ${{ secrets.TEACON_REGISTRY_TOKEN }}
- name: Extract Metadata for Docker
id: meta
uses: docker/[email protected]
with:
images: ghcr.io/${{ github.repository_owner }}/chahoutan
images: |
${{ secrets.TEACON_REGISTRY }}/chahoutan
ghcr.io/${{ github.repository_owner }}/chahoutan
- name: Build and Push Docker Image
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit bc2c947

Please sign in to comment.