Skip to content

Commit

Permalink
chore: move existing workflow in subdirectory
Browse files Browse the repository at this point in the history
Relates #133

Signed-off-by: Gabriele Bartolini <[email protected]>
  • Loading branch information
gbartolini committed Jan 3, 2025
1 parent 1a93a00 commit 4410fc1
Show file tree
Hide file tree
Showing 42 changed files with 10 additions and 13 deletions.
7 changes: 2 additions & 5 deletions .github/generate-strategy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
set -eu

ROOT_DIR=$(cd "$(dirname "$0")/../"; pwd)
source "${ROOT_DIR}/lib/repo_funcs.sh"
BASE_DIRECTORY="${ROOT_DIR}/SYSTEM_IMAGES"
source "${BASE_DIRECTORY}/lib/repo_funcs.sh"

# Define an optional aliases for some major versions
declare -A aliases=(
Expand All @@ -21,10 +22,6 @@ DEFAULT_DISTRO="bullseye"

GITHUB_ACTIONS=${GITHUB_ACTIONS:-false}

cd "$(dirname "$(readlink -f "${BASH_SOURCE[0]}/..")")"
BASE_DIRECTORY="$(pwd)"


# Retrieve the PostgreSQL versions for Debian
cd ${BASE_DIRECTORY}/Debian
for version in */; do
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- main
paths-ignore:
- Debian/ClusterImageCatalog*.yaml
- SYSTEM_IMAGES/Debian/ClusterImageCatalog*.yaml
workflow_dispatch:

env:
Expand Down Expand Up @@ -194,10 +194,10 @@ jobs:

- name: Update ClusterImageCatalog
run: |
yq eval-all '. as $item ireduce ({}; . *+ $item )' clusterimagecatalog/*-bullseye.yaml > Debian/ClusterImageCatalog-bullseye.yaml
yq eval-all '. as $item ireduce ({}; . *+ $item )' clusterimagecatalog/*-bookworm.yaml > Debian/ClusterImageCatalog-bookworm.yaml
ln -f -s ClusterImageCatalog-${DEFAULT_DISTRO}.yaml Debian/ClusterImageCatalog.yaml
cat Debian/ClusterImageCatalog.yaml Debian/ClusterImageCatalog-bullseye.yaml Debian/ClusterImageCatalog-bookworm.yaml
yq eval-all '. as $item ireduce ({}; . *+ $item )' clusterimagecatalog/*-bullseye.yaml > SYSTEM_IMAGES/Debian/ClusterImageCatalog-bullseye.yaml
yq eval-all '. as $item ireduce ({}; . *+ $item )' clusterimagecatalog/*-bookworm.yaml > SYSTEM_IMAGES/Debian/ClusterImageCatalog-bookworm.yaml
ln -f -s ClusterImageCatalog-${DEFAULT_DISTRO}.yaml SYSTEM_IMAGES/Debian/ClusterImageCatalog.yaml
cat Debian/ClusterImageCatalog.yaml Debian/ClusterImageCatalog-bullseye.yaml SYSTEM_IMAGES/Debian/ClusterImageCatalog-bookworm.yaml
- name: Temporarily disable "include administrators" branch protection
if: ${{ always() && github.ref == 'refs/heads/main' }}
Expand All @@ -215,7 +215,7 @@ jobs:
author_name: CloudNativePG Automated Updates
author_email: [email protected]
message: 'Automatic ClusterImageCatalog update'
add: 'Debian/ClusterImageCatalog*.yaml'
add: 'SYSTEM_IMAGES/Debian/ClusterImageCatalog*.yaml'

- name: Enable "include administrators" branch protection
uses: benjefferies/[email protected]
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
pip3 install --upgrade pip-tools pip
export PATH=$HOME/.local/bin:$PATH
echo "Updating Debian bullseye images"
./Debian/update.sh -d bullseye
./SYSTEM_IMAGES/Debian/update.sh -d bullseye
- uses: actions/setup-python@v5
with:
Expand All @@ -48,7 +48,7 @@ jobs:
pip3 install --upgrade pip-tools pip
export PATH=$HOME/.local/bin:$PATH
echo "Updating Debian bookworm images"
./Debian/update.sh -d bookworm
./SYSTEM_IMAGES/Debian/update.sh -d bookworm
- name: Diff
run: |
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 4410fc1

Please sign in to comment.