From 3ad5bb6be5bd6cfbd27ba32c809400da3e774169 Mon Sep 17 00:00:00 2001 From: "Endi S. Dewata" Date: Wed, 6 Sep 2023 13:00:39 -0500 Subject: [PATCH] Replace BASE64_OS with BASE_IMAGE --- .github/workflows/build.yml | 11 ++++++----- .github/workflows/init.yml | 6 ------ tests/bin/init-workflow.sh | 14 -------------- 3 files changed, 6 insertions(+), 25 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index de6fa1f1f..e41665762 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,7 @@ name: Build JSS on: [push, pull_request] env: + BASE_IMAGE: ${{ vars.BASE_IMAGE || 'registry.fedoraproject.org/fedora:latest' }} COPR_REPO: ${{ vars.COPR_REPO || '@pki/master' }} jobs: @@ -34,7 +35,7 @@ jobs: with: context: . build-args: | - BASE_IMAGE=${{ needs.init.outputs.base-image }} + BASE_IMAGE=${{ env.BASE_IMAGE }} COPR_REPO=${{ env.COPR_REPO }} tags: jss-deps target: jss-deps @@ -46,7 +47,7 @@ jobs: with: context: . build-args: | - BASE_IMAGE=${{ needs.init.outputs.base-image }} + BASE_IMAGE=${{ env.BASE_IMAGE }} COPR_REPO=${{ env.COPR_REPO }} tags: jss-builder-deps target: jss-builder-deps @@ -58,7 +59,7 @@ jobs: with: context: . build-args: | - BASE_IMAGE=${{ needs.init.outputs.base-image }} + BASE_IMAGE=${{ env.BASE_IMAGE }} COPR_REPO=${{ env.COPR_REPO }} tags: jss-builder target: jss-builder @@ -76,7 +77,7 @@ jobs: with: context: . build-args: | - BASE_IMAGE=${{ needs.init.outputs.base-image }} + BASE_IMAGE=${{ env.BASE_IMAGE }} COPR_REPO=${{ env.COPR_REPO }} tags: jss-dist target: jss-dist @@ -94,7 +95,7 @@ jobs: with: context: . build-args: | - BASE_IMAGE=${{ needs.init.outputs.base-image }} + BASE_IMAGE=${{ env.BASE_IMAGE }} COPR_REPO=${{ env.COPR_REPO }} tags: jss-runner target: jss-runner diff --git a/.github/workflows/init.yml b/.github/workflows/init.yml index 7f8ab9717..5bafd7d49 100644 --- a/.github/workflows/init.yml +++ b/.github/workflows/init.yml @@ -2,13 +2,9 @@ name: Initialization on: workflow_call: secrets: - BASE64_OS: - required: false BASE64_DATABASE: required: false outputs: - base-image: - value: ${{ jobs.init.outputs.base-image }} db-image: value: ${{ jobs.init.outputs.db-image }} @@ -17,7 +13,6 @@ jobs: name: Initializing workflow runs-on: ubuntu-latest outputs: - base-image: ${{ steps.init.outputs.base-image }} db-image: ${{ steps.init.outputs.db-image }} steps: - name: Clone repository @@ -26,7 +21,6 @@ jobs: - name: Initialize workflow id: init env: - BASE64_OS: ${{ secrets.BASE64_OS }} BASE64_DATABASE: ${{ secrets.BASE64_DATABASE }} run: | tests/bin/init-workflow.sh diff --git a/tests/bin/init-workflow.sh b/tests/bin/init-workflow.sh index 5db832039..afbf8113f 100755 --- a/tests/bin/init-workflow.sh +++ b/tests/bin/init-workflow.sh @@ -1,19 +1,5 @@ #!/bin/bash -e -################################################################################ -# Base image - -if [ "$BASE64_OS" != "" ] -then - OS_VERSION=$(echo "$BASE64_OS" | base64 -d) -else - OS_VERSION=latest -fi - -BASE_IMAGE=registry.fedoraproject.org/fedora:$OS_VERSION -echo "BASE_IMAGE: $BASE_IMAGE" -echo "base-image=$BASE_IMAGE" >> $GITHUB_OUTPUT - ################################################################################ # Database image