From 888e9eb9e5816c050408b8a6bd15b89aa5a657dc Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Sun, 11 Feb 2024 18:07:29 +0900 Subject: [PATCH] Prepare universal workflow --- .github/workflows/images_build.yml | 2 +- .github/workflows/images_build_rhel.yml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/images_build.yml b/.github/workflows/images_build.yml index bfd07fe63..fed567827 100644 --- a/.github/workflows/images_build.yml +++ b/.github/workflows/images_build.yml @@ -16,7 +16,7 @@ on: - '!Dockerfiles/*/windows/*' - '.github/workflows/images_build.yml' schedule: - - cron: '10 14 * * *' + - cron: '50 02 * * *' workflow_dispatch: defaults: diff --git a/.github/workflows/images_build_rhel.yml b/.github/workflows/images_build_rhel.yml index 2071b2146..5390861de 100644 --- a/.github/workflows/images_build_rhel.yml +++ b/.github/workflows/images_build_rhel.yml @@ -11,9 +11,10 @@ defaults: shell: bash env: - AUTO_PUSH_IMAGES: ${{ vars.AUTO_PUSH_IMAGES }} + AUTO_PUSH_IMAGES: ${{ contains(fromJSON('["workflow_dispatch"]'), github.event_name) && 'false' || vars.AUTO_PUSH_IMAGES }} LATEST_BRANCH: ${{ github.event.repository.default_branch }} + TRUNK_GIT_BRANCH: "refs/heads/trunk" IMAGES_PREFIX: "zabbix-" BASE_BUILD_NAME: "build-base" @@ -58,7 +59,7 @@ jobs: shell: bash env: LATEST_BRANCH: ${{ env.LATEST_BRANCH }} - github_ref: ${{ env.TRUNK_ONLY_EVENT == 'true' && env.TRUNK_GIT_BRANCH || github.ref }} + github_ref: ${{ github.ref }} run: | result=false sha_short=$(git rev-parse --short HEAD) @@ -334,6 +335,7 @@ jobs: - name: Log in to Quay.io uses: redhat-actions/podman-login@v1.6 + if: ${{ env.AUTO_PUSH_IMAGES == 'true' }} env: LOGIN: ${{ steps.login_credentials.outputs.username }} PASSWORD: ${{ steps.login_credentials.outputs.password }}