Skip to content

Commit c613649

Browse files
authored
ci: Fork awareness (#214)
* ci(cockpit): use install-nix-action * fix(nix): add shebang to script (stackabletech/operator-templating#325) * ci(cockpit): separate build/publish steps so that fork PRs don't fail on publish * chore: remove old BORS message from PR tempate
1 parent 3315de4 commit c613649

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

.github/pull_request_template.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,3 @@
3333
- [ ] Proper release label has been added
3434
```
3535

36-
Once the review is done, comment `bors r+` (or `bors merge`) to merge. [Further information](https://bors.tech/documentation/getting-started/#reviewing-pull-requests)

.github/workflows/pr_cockpit.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
8888
with:
8989
submodules: recursive
90-
90+
- uses: cachix/install-nix-action@6004951b182f8860210c8d6f0d808ec5b1a33d28 # tag=v25
9191
- name: Setup Rust
9292
uses: dtolnay/rust-toolchain@0e66bd3e6b38ec0ad5312288c83e47c143e6b09e # v1
9393
with:
@@ -106,8 +106,12 @@ jobs:
106106
# Recreate charts and publish charts and docker image. The "-e" is needed as we want to override the
107107
# default value in the makefile if called from this action, but not otherwise (i.e. when called locally).
108108
# This is needed for the HELM_REPO variable.
109+
- name: Build Docker Image and Helm Chart
110+
run: make -e build
109111
- name: Publish Docker Image and Helm Chart
112+
if: ${{ !github.event.pull_request.head.repo.fork }}
110113
run: make -e publish
111114
- id: printtag
115+
if: ${{ !github.event.pull_request.head.repo.fork }}
112116
name: Output Image Name and Tag
113117
run: echo "IMAGE_TAG=$(make -e print-docker-tag)" >> "$GITHUB_OUTPUT"

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ regenerate-nix:
8080

8181
build: regenerate-charts regenerate-nix helm-package docker-build
8282

83-
publish: build docker-publish helm-publish
83+
publish: docker-publish helm-publish
8484

8585
run-dev:
8686
kubectl apply -f deploy/stackable-operators-ns.yaml

default.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ rec {
142142

143143
regenerateNixLockfiles = pkgs.writeScriptBin "regenerate-nix-lockfiles"
144144
''
145+
#!/usr/bin/env bash
145146
set -euo pipefail
146147
echo Running crate2nix
147148
${crate2nix}/bin/crate2nix generate

0 commit comments

Comments
 (0)