mirror of
https://github.com/clearlinux/official-images.git
synced 2026-10-04 07:48:51 +00:00
Update more "bashbrew.git" references in the repo to use "bashbrew-version"
This commit is contained in:
@@ -8,6 +8,12 @@ set -Eeuo pipefail
|
||||
|
||||
bashbrewDir="$1"; shift
|
||||
|
||||
dir="$(dirname "$BASH_SOURCE")" # ./.github/workflows
|
||||
oiDir="$(dirname "$dir")" # ./.github
|
||||
oiDir="$(dirname "$oiDir")" # ./
|
||||
bashbrewVersion="$(< "$oiDir/bashbrew-version")"
|
||||
export bashbrewVersion
|
||||
|
||||
if [ "$#" -eq 0 ]; then
|
||||
git fetch --quiet https://github.com/docker-library/official-images.git master
|
||||
changes="$(git diff --no-renames --name-only --diff-filter='d' FETCH_HEAD...HEAD -- library/)"
|
||||
@@ -24,7 +30,7 @@ for repo; do
|
||||
| .name = ($tags | join(", "))
|
||||
# replace "build" steps with something that uses "bashbrew" instead of "docker build"
|
||||
# https://github.com/docker-library/bashbrew/blob/a40a54d4d81b9fd2e39b4d7ba3fe203e8b022a67/scripts/github-actions/generate.sh#L74-L93
|
||||
| .runs.prepare += "\ngit clone --depth 1 https://github.com/docker-library/bashbrew.git ~/bashbrew\n~/bashbrew/bashbrew.sh --version"
|
||||
| .runs.prepare += "\ngit clone --depth 1 https://github.com/docker-library/bashbrew.git -b " + ("v" + env.bashbrewVersion | @sh) + " ~/bashbrew\n~/bashbrew/bashbrew.sh --version"
|
||||
| .runs.build = (
|
||||
(if .os | startswith("windows-") then "export BASHBREW_ARCH=windows-amd64 BASHBREW_CONSTRAINTS=" + ([ .meta.entries[].constraints[] ] | join(", ") | @sh) + "\n" else "" end)
|
||||
+ "export BASHBREW_LIBRARY=\"$PWD/library\"\n"
|
||||
|
||||
@@ -30,7 +30,8 @@ jobs:
|
||||
fetch-depth: 0
|
||||
- name: Check for Common Issues
|
||||
run: |
|
||||
git clone --depth 1 https://github.com/docker-library/bashbrew.git -b master ~/bashbrew
|
||||
bashbrewVersion="$(< bashbrew-version)"
|
||||
git clone --depth 1 https://github.com/docker-library/bashbrew.git -b "v$bashbrewVersion" ~/bashbrew
|
||||
~/bashbrew/bashbrew.sh --version > /dev/null
|
||||
export PATH="$HOME/bashbrew/bin:$PATH"
|
||||
bashbrew --version
|
||||
@@ -49,7 +50,8 @@ jobs:
|
||||
- id: generate-jobs
|
||||
name: Generate Jobs
|
||||
run: |
|
||||
git clone --depth 1 https://github.com/docker-library/bashbrew.git -b master ~/bashbrew
|
||||
bashbrewVersion="$(< bashbrew-version)"
|
||||
git clone --depth 1 https://github.com/docker-library/bashbrew.git -b "v$bashbrewVersion" ~/bashbrew
|
||||
strategy="$(.github/workflows/generate.sh ~/bashbrew)"
|
||||
jq . <<<"$strategy" # sanity check / debugging aid
|
||||
echo "::set-output name=strategy::$strategy"
|
||||
|
||||
Reference in New Issue
Block a user