From 8b3bfef68fdf0cbc31f2ec77dc8a103a5fdac7a2 Mon Sep 17 00:00:00 2001 From: syncomp-dev1 <“syncomp-dev1@users.noreply.github.com”> Date: Fri, 2 Sep 2022 09:50:30 -0400 Subject: [PATCH] Added condition for release workflow --- .github/workflows/build_aca_image.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build_aca_image.yml b/.github/workflows/build_aca_image.yml index 1228e170..3ed607d1 100644 --- a/.github/workflows/build_aca_image.yml +++ b/.github/workflows/build_aca_image.yml @@ -2,12 +2,6 @@ name: ACA Docker Image Build on: release: types: [ published ] - inputs: - imagename: - description: 'ACA Docker Image Name' - default: 'aca-centos7' - required: false - type: string workflow_dispatch: inputs: imagename: @@ -54,7 +48,15 @@ jobs: cp /HIRS/package/rpm/RPMS/x86_64/* /.; \ cp /HIRS/scripts/aca_image_setup.sh /.; \ popd;' \ + - name: Build and publish a release Docker image for ${{ github.repository }} + if: github.event_name == 'release' + uses: macbre/push-to-ghcr@master + with: + image_name: nsacyber/hirs/aca-centos7 + github_token: ${{ secrets.GHCR_TOKEN }} + dockerfile: "./.ci/docker/Dockerfile.acaimage" - name: Build and publish a Docker image for ${{ github.repository }} + if: github.event_name == 'workflow_dispatch' uses: macbre/push-to-ghcr@master with: image_name: nsacyber/hirs/${{ inputs.imagename }}