mirror of
https://github.com/yanhao98/composite-actions.git
synced 2025-07-14 07:10:48 +08:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
746c056e16 | |||
bf2f20471c | |||
5bd89bc7bb | |||
ad1ed515d9 |
27
.github/workflows/docker-build-push.yml
vendored
27
.github/workflows/docker-build-push.yml
vendored
@ -2,11 +2,12 @@ name: docker-build-push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'docker-build-push/**'
|
||||
- '.github/workflows/docker-build-push.yml'
|
||||
# branches:
|
||||
# - main
|
||||
# paths:
|
||||
# - 'docker-build-push/**'
|
||||
# - '.github/workflows/docker-build-push.yml'
|
||||
pull_request:
|
||||
|
||||
env:
|
||||
TZ: Asia/Shanghai
|
||||
@ -25,13 +26,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 +44,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