Skip to content

Commit

Permalink
Fix use of publish-image GHA from other repositories (#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjbgf authored Jul 31, 2024
1 parent 3e1cccf commit dea9a51
Showing 1 changed file with 31 additions and 15 deletions.
46 changes: 31 additions & 15 deletions actions/publish-image/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,38 @@
# Use push-to-public and push-to-prime to pick the target registries.
#
# Reference usage:
# - name: Publish manifest
# uses: rancher/ecm-distro-tools/actions/publish-image@master
# with:
# image: security-scan
# tag: ${{ github.ref_name }}${{ matrix.tag-suffix }}
# platforms: ${{ matrix.platforms }}
#
# public-registry: ${{ vars.PUBLIC_REGISTRY }}
# public-repo: ${{ vars.PUBLIC_REGISTRY_REPO }}
# public-username: ${{ secrets.PUBLIC_REGISTRY_USERNAME }}
# public-password: ${{ secrets.PUBLIC_REGISTRY_PASSWORD }}
# strategy:
# matrix:
# include:
# # Three images are created:
# # - Multi-arch manifest for both amd64 and arm64
# - tag-suffix: ""
# platforms: linux/amd64,linux/arm64
# # - arm64 manifest
# - tag-suffix: "-arm64"
# platforms: linux/arm64
# # - amd64 manifest
# - tag-suffix: "-amd64"
# platforms: linux/amd64
# steps:
# ...
# - name: Publish manifest
# uses: rancher/ecm-distro-tools/actions/publish-image@master
# with:
# image: security-scan
# tag: ${{ github.ref_name }}${{ matrix.tag-suffix }}
# platforms: ${{ matrix.platforms }}
#
# prime-registry: ${{ secrets.PRIME_REGISTRY }}
# prime-repo: ${{ secrets.PRIME_REGISTRY_REPO }}
# prime-username: ${{ secrets.PRIME_REGISTRY_USERNAME }}
# prime-password: ${{ secrets.PRIME_REGISTRY_PASSWORD }}
# public-registry: ${{ vars.PUBLIC_REGISTRY }}
# public-repo: ${{ vars.PUBLIC_REGISTRY_REPO }}
# public-username: ${{ secrets.PUBLIC_REGISTRY_USERNAME }}
# public-password: ${{ secrets.PUBLIC_REGISTRY_PASSWORD }}
#
# prime-registry: ${{ secrets.PRIME_REGISTRY }}
# prime-repo: ${{ secrets.PRIME_REGISTRY_REPO }}
# prime-username: ${{ secrets.PRIME_REGISTRY_USERNAME }}
# prime-password: ${{ secrets.PRIME_REGISTRY_PASSWORD }}

name: publish-image

Expand All @@ -35,7 +51,7 @@ inputs:
tag:
description: |
The tag used for the image to be published. Most often its value
will be either ${{ github.ref_name }} or that with an architecture
will be either github.ref_name or that with an architecture
specific suffix.
required: true
type: string
Expand Down

0 comments on commit dea9a51

Please sign in to comment.