mirror of
https://github.com/redhat-actions/push-to-registry.git
synced 2025-05-04 04:09:54 +02:00
Remove pull_request_target from workflows that push images
Signed-off-by: Tim Etchells <tetchell@redhat.com>
This commit is contained in:
parent
f52484f302
commit
74b235b626
2 changed files with 20 additions and 18 deletions
21
.github/workflows/multiple-build.yaml
vendored
21
.github/workflows/multiple-build.yaml
vendored
|
@ -1,7 +1,6 @@
|
|||
name: Multiple container CLI build tests
|
||||
on:
|
||||
push:
|
||||
pull_request_target:
|
||||
workflow_dispatch:
|
||||
env:
|
||||
IMAGE_NAME: myimage
|
||||
|
@ -32,12 +31,12 @@ jobs:
|
|||
registry: ${{ env.IMAGE_REGISTRY }}/${{ secrets.REGISTRY_USER }}
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
|
||||
- name: Echo outputs
|
||||
run: |
|
||||
echo "Digest: ${{ steps.push.outputs.digest }}"
|
||||
echo "Registry Paths: ${{ steps.push.outputs.registry-paths }}"
|
||||
|
||||
|
||||
build-only-docker:
|
||||
name: Build and push image built only on Docker
|
||||
runs-on: ubuntu-20.04
|
||||
|
@ -61,12 +60,12 @@ jobs:
|
|||
registry: ${{ env.IMAGE_REGISTRY }}/${{ secrets.REGISTRY_USER }}
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
|
||||
- name: Echo outputs
|
||||
run: |
|
||||
echo "Digest: ${{ steps.push.outputs.digest }}"
|
||||
echo "Registry Paths: ${{ steps.push.outputs.registry-paths }}"
|
||||
|
||||
|
||||
build-podman-latest:
|
||||
name: Build and push image built latest on Podman
|
||||
runs-on: ubuntu-20.04
|
||||
|
@ -80,7 +79,7 @@ jobs:
|
|||
FROM busybox
|
||||
RUN echo "hello world"
|
||||
EOF
|
||||
|
||||
|
||||
- name: Build image using Podman
|
||||
run: |
|
||||
podman build -t ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} -<<EOF
|
||||
|
@ -88,7 +87,7 @@ jobs:
|
|||
RUN echo "hello world"
|
||||
EOF
|
||||
|
||||
- name: Push image to ${{ env.IMAGE_REGISTRY }}
|
||||
- name: Push image to ${{ env.IMAGE_REGISTRY }}
|
||||
id: push
|
||||
uses: ./
|
||||
with:
|
||||
|
@ -97,7 +96,7 @@ jobs:
|
|||
registry: ${{ env.IMAGE_REGISTRY }}/${{ secrets.REGISTRY_USER }}
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
|
||||
- name: Echo outputs
|
||||
run: |
|
||||
echo "Digest: ${{ steps.push.outputs.digest }}"
|
||||
|
@ -124,7 +123,7 @@ jobs:
|
|||
RUN echo "hello world"
|
||||
EOF
|
||||
|
||||
- name: Push image to ${{ env.IMAGE_REGISTRY }}
|
||||
- name: Push image to ${{ env.IMAGE_REGISTRY }}
|
||||
id: push
|
||||
uses: ./
|
||||
with:
|
||||
|
@ -133,8 +132,8 @@ jobs:
|
|||
registry: ${{ env.IMAGE_REGISTRY }}/${{ secrets.REGISTRY_USER }}
|
||||
username: ${{ secrets.REGISTRY_USER }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
|
||||
- name: Echo outputs
|
||||
run: |
|
||||
echo "Digest: ${{ steps.push.outputs.digest }}"
|
||||
echo "Registry Paths: ${{ steps.push.outputs.registry-paths }}"
|
||||
echo "Registry Paths: ${{ steps.push.outputs.registry-paths }}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue