mirror of
https://github.com/yanhao98/composite-actions.git
synced 2025-07-13 23:00:48 +08:00
feat: 更新 docker-build-push.yml,启用 GitHub Container Registry 登录步骤
This commit is contained in:
16
.github/workflows/docker-build-push.yml
vendored
16
.github/workflows/docker-build-push.yml
vendored
@ -25,13 +25,13 @@ jobs:
|
||||
with:
|
||||
username: ${{ vars.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
# - name: Login to GitHub Container Registry
|
||||
# if: steps.semantic.outputs.next_release_published == 'true'
|
||||
# uses: docker/login-action@v3
|
||||
# with:
|
||||
# registry: ghcr.io
|
||||
# username: ${{ github.repository_owner }}
|
||||
# password: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Login to GitHub Container Registry
|
||||
if: steps.semantic.outputs.next_release_published == 'true'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- uses: yanhao98/composite-actions/docker-build-push@main
|
||||
if: steps.semantic.outputs.next_release_published == 'true'
|
||||
@ -43,7 +43,7 @@ jobs:
|
||||
build_load: false
|
||||
metadata_images: |
|
||||
docker.io/${{ vars.DOCKERHUB_USERNAME }}/docker-example
|
||||
# ghcr.io/${{ github.repository }}
|
||||
ghcr.io/${{ github.repository }}
|
||||
metadata_tags: |
|
||||
type=semver,pattern={{version}},value=${{ steps.semantic.outputs.next_release_version }}
|
||||
type=semver,pattern={{major}}.{{minor}},value=${{ steps.semantic.outputs.next_release_version }}
|
||||
|
Reference in New Issue
Block a user