Remove pull_request_target from workflows that push images

Signed-off-by: Tim Etchells <tetchell@redhat.com>
This commit is contained in:
Tim Etchells 2021-02-20 13:37:54 -05:00
parent f52484f302
commit 74b235b626
2 changed files with 20 additions and 18 deletions

View file

@ -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 }}"