Skip to content

Commit

Permalink
Replace BASE64_OS with BASE_IMAGE
Browse files Browse the repository at this point in the history
  • Loading branch information
edewata committed Sep 6, 2023
1 parent 5ca0156 commit 21d0e77
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: Build Test
needs: init
runs-on: ubuntu-latest
container: ${{ needs.init.outputs.base-image }}
container: ${{ vars.BASE_IMAGE || 'registry.fedoraproject.org/fedora:latest' }}
steps:
- name: Clone repository
uses: actions/checkout@v2
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Build IDM Console Framework
on: [push, pull_request]

env:
BASE_IMAGE: ${{ vars.BASE_IMAGE || 'registry.fedoraproject.org/fedora:latest' }}
COPR_REPO: ${{ vars.COPR_REPO || '@pki/master' }}

jobs:
Expand Down Expand Up @@ -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: idm-console-framework-deps
target: idm-console-framework-deps
Expand All @@ -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: idm-console-framework-builder-deps
target: idm-console-framework-builder-deps
Expand All @@ -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: idm-console-framework-builder
target: idm-console-framework-builder
Expand All @@ -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: idm-console-framework-dist
target: idm-console-framework-dist
Expand All @@ -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: idm-console-framework-runner
target: idm-console-framework-runner
Expand Down
6 changes: 0 additions & 6 deletions .github/workflows/init.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand All @@ -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
Expand All @@ -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
14 changes: 0 additions & 14 deletions tests/bin/init-workflow.sh
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 21d0e77

Please sign in to comment.