4 Commits

2 changed files with 15 additions and 13 deletions

View File

@ -2,11 +2,12 @@ name: docker-build-push
on: on:
push: push:
branches: # branches:
- main # - main
paths: # paths:
- 'docker-build-push/**' # - 'docker-build-push/**'
- '.github/workflows/docker-build-push.yml' # - '.github/workflows/docker-build-push.yml'
pull_request:
env: env:
TZ: Asia/Shanghai TZ: Asia/Shanghai
@ -25,13 +26,13 @@ jobs:
with: with:
username: ${{ vars.DOCKERHUB_USERNAME }} username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Login to GitHub Container Registry - name: Login to GitHub Container Registry
# if: steps.semantic.outputs.next_release_published == 'true' if: steps.semantic.outputs.next_release_published == 'true'
# uses: docker/login-action@v3 uses: docker/login-action@v3
# with: with:
# registry: ghcr.io registry: ghcr.io
# username: ${{ github.repository_owner }} username: ${{ github.repository_owner }}
# password: ${{ secrets.GITHUB_TOKEN }} password: ${{ secrets.GITHUB_TOKEN }}
- uses: yanhao98/composite-actions/docker-build-push@main - uses: yanhao98/composite-actions/docker-build-push@main
if: steps.semantic.outputs.next_release_published == 'true' if: steps.semantic.outputs.next_release_published == 'true'
@ -43,7 +44,7 @@ jobs:
build_load: false build_load: false
metadata_images: | metadata_images: |
docker.io/${{ vars.DOCKERHUB_USERNAME }}/docker-example docker.io/${{ vars.DOCKERHUB_USERNAME }}/docker-example
# ghcr.io/${{ github.repository }} ghcr.io/${{ github.repository }}
metadata_tags: | metadata_tags: |
type=semver,pattern={{version}},value=${{ steps.semantic.outputs.next_release_version }} type=semver,pattern={{version}},value=${{ steps.semantic.outputs.next_release_version }}
type=semver,pattern={{major}}.{{minor}},value=${{ steps.semantic.outputs.next_release_version }} type=semver,pattern={{major}}.{{minor}},value=${{ steps.semantic.outputs.next_release_version }}

1
README.md Normal file
View File

@ -0,0 +1 @@
- https://github.com/renovatebot/renovate/blob/81fc75630b0b43fb4b89a0b65c1086d487e65d2e/.github/actions/setup-node/action.yml