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 a9b35eb commit 3ad5bb6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 25 deletions.
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 JSS
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: jss-deps
target: jss-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: jss-builder-deps
target: jss-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: jss-builder
target: jss-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: jss-dist
target: jss-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: jss-runner
target: jss-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 3ad5bb6

Please sign in to comment.