Skip to content

Commit b82268b

Browse files
authored
Merge branch 'master' into feat/disallow-debug-format
2 parents 79d549b + 6e7aa3f commit b82268b

File tree

24 files changed

+147
-34
lines changed

24 files changed

+147
-34
lines changed
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: Update Catalyst CI Deps
2+
3+
on:
4+
release:
5+
types: [published, edited]
6+
workflow_dispatch:
7+
inputs:
8+
dry_run:
9+
description: "Run in dry-run mode (no PRs created)"
10+
type: boolean
11+
default: false
12+
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
17+
jobs:
18+
notify-dependents:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Get release info
22+
id: release_info
23+
run: |
24+
if [ "${{ github.event_name }}" = "release" ]; then
25+
echo "tag_name=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
26+
echo "release_url=${{ github.event.release.html_url }}" >> $GITHUB_OUTPUT
27+
echo "release_notes=${{ github.event.release.body }}" >> $GITHUB_OUTPUT
28+
else
29+
# For manual dispatch, use latest release
30+
LATEST_TAG=$(git describe --tags --abbrev=0)
31+
echo "tag_name=$LATEST_TAG" >> $GITHUB_OUTPUT
32+
echo "release_url=https://github.com/${{ github.repository }}/releases/latest" >> $GITHUB_OUTPUT
33+
echo "release_notes=Manual dispatch" >> $GITHUB_OUTPUT
34+
fi
35+
36+
- name: Create PRs for dependent repositories
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
DRY_RUN: ${{ inputs.dry_run }}
40+
RELEASE_TAG: ${{ steps.release_info.outputs.tag_name }}
41+
RELEASE_URL: ${{ steps.release_info.outputs.release_url }}
42+
RELEASE_NOTES: ${{ steps.release_info.outputs.release_notes }}
43+
run: |
44+
REPOS=(
45+
"input-output-hk/catalyst-voices"
46+
"input-output-hk/hermes"
47+
"input-output-hk/catalyst-libs"
48+
"input-output-hk/catalyst-reviews"
49+
"input-output-hk/catalyst-som"
50+
"input-output-hk/catalyst-execution"
51+
"input-output-hk/norns"
52+
)
53+
54+
for repo in "${REPOS[@]}"; do
55+
repo=$(echo "$repo" | tr -d ' ')
56+
if [ -n "$repo" ]; then
57+
echo "Processing $repo"
58+
59+
if [ "$DRY_RUN" = "true" ]; then
60+
echo "[DRY RUN] Would create PR for $repo"
61+
else
62+
branch_name="chore/update-catalyst-ci-to-$(echo $RELEASE_TAG | tr -d 'v')"
63+
64+
default_branch=$(gh api repos/$repo --jq '.default_branch')
65+
base_sha=$(gh api repos/$repo/branches/$default_branch --jq '.commit.sha')
66+
gh api repos/$repo/git/refs -f ref="refs/heads/$branch_name" -f sha="$base_sha"
67+
gh pr create \
68+
--repo "$repo" \
69+
--title "Update catalyst-ci to $RELEASE_TAG" \
70+
--body "Update catalyst-ci to $RELEASE_TAG. Release: $RELEASE_URL" \
71+
--head "$branch_name" \
72+
--base "$default_branch"
73+
74+
echo "Created PR for $repo"
75+
fi
76+
77+
sleep 2
78+
fi
79+
done

Earthfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ IMPORT ./earthly/bash AS bash-ci
66
IMPORT ./earthly/spectral AS spectral-ci
77
IMPORT ./earthly/python AS python-ci
88

9+
ARG --global REGISTRY="harbor.shared-services.projectcatalyst.io/dockerhub/library"
10+
911
# cspell: words livedocs sitedocs
1012

1113

@@ -21,7 +23,7 @@ markdown-check-fix:
2123

2224
# Make sure the project dictionary is properly sorted.
2325
clean-spelling-list:
24-
FROM debian:stable-slim
26+
FROM ${REGISTRY}/debian:stable-slim
2527
DO cspell-ci+CLEAN
2628

2729
# check-spelling Check spelling in this repo inside a container.
@@ -30,7 +32,7 @@ check-spelling:
3032

3133
# check-bash - test all bash files lint properly according to shellcheck.
3234
check-bash:
33-
FROM alpine:3.20.3
35+
FROM ${REGISTRY}/alpine:3.20.3
3436

3537
DO bash-ci+SHELLCHECK --src=.
3638

earthly/bash/Earthfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ IMPORT ../../utilities/scripts AS scripts
44

55
# Internal: builder creates a container we can use to execute shellcheck
66
builder:
7-
FROM alpine:3.20.3
7+
FROM harbor.shared-services.projectcatalyst.io/dockerhub/library/alpine:3.20.3
88

99
RUN apk add --no-cache \
1010
bash \

earthly/cassandra/Earthfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ VERSION 0.8
55
IMPORT ../../utilities/cql-to-d2 AS cql-to-d2-utils
66

77
scylladb-base:
8-
FROM scylladb/scylla:6.1.1
8+
FROM harbor.shared-services.projectcatalyst.io/dockerhub/scylladb/scylla:6.1.1
99

1010
WORKDIR /root
1111

earthly/cddl/Earthfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ VERSION 0.8
33
# cspell: words cddlc
44

55
cddl-base:
6-
FROM ruby:3.3.0-alpine
6+
ARG REGISTRY="harbor.shared-services.projectcatalyst.io/dockerhub/library"
7+
FROM ${REGISTRY}/ruby:3.3.0-alpine
78

89
RUN gem install cddlc

earthly/cspell/Earthfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@ CHECK:
1111

1212
# Unlikely to need to change this.
1313
ARG cfg_file=cspell.json
14+
ARG REGISTRY="harbor.shared-services.projectcatalyst.io/ghcr"
1415

15-
FROM ghcr.io/streetsidesoftware/cspell:8.13.3
16+
FROM ${REGISTRY}/streetsidesoftware/cspell:8.13.3
1617
WORKDIR /work
1718

1819
COPY $src .

earthly/cue/Earthfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ VERSION 0.8
33
IMPORT ../debian AS debian
44

55
# Define a constant name for the container and its version.
6-
ARG --global CUE_IMAGE="cuelang/cue:0.14.1"
6+
ARG --global CUE_IMAGE="harbor.shared-services.projectcatalyst.io/dockerhub/cuelang/cue:0.14.1"
77

88

99
INSTALL:

earthly/debian/Earthfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
VERSION 0.8
22

33
# Define a constant name for the container and its version.
4-
ARG --global DEBIAN_IMAGE="debian:13.0-slim"
4+
ARG --global DEBIAN_IMAGE="harbor.shared-services.projectcatalyst.io/dockerhub/library/debian:13.0-slim"
55

66
# Optimally install packages for debian
77
INSTALL:

earthly/docs/Earthfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ PACKAGE:
114114
FUNCTION
115115

116116
# Use the official Nginx base image
117-
FROM nginx:bookworm
117+
FROM harbor.shared-services.projectcatalyst.io/dockerhub/library/nginx:bookworm
118118

119119
# Force this server to disable the browsers cache for these files.
120120
RUN echo " " > /etc/nginx/conf.d/disable-cache.conf; \

earthly/flutter/Earthfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ VERSION 0.8
44

55
IMPORT ./installer AS installer
66

7+
ARG --global REGISTRY="harbor.shared-services.projectcatalyst.io/dockerhub/library"
8+
79
# TODO(bkioshn): https://github.com/input-output-hk/catalyst-ci/issues/322
810
# Install flutter.
911
INSTALL_FLUTTER:
@@ -37,7 +39,7 @@ INSTALL_FLUTTER:
3739

3840
# flutter-base installs required tools and packages.
3941
flutter-base:
40-
FROM debian:bookworm-20250203-slim
42+
FROM ${REGISTRY}/debian:bookworm-20250203-slim
4143

4244
ENV DEBIAN_FRONTEND=noninteractive
4345

0 commit comments

Comments
 (0)