Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): fix vendir sync action in PRs from external forks #3661

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/quickstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Test quickstart
run: |
cd quickstart
./bin/bump-galoy-git-ref.sh ${{ github.event.pull_request.head.sha }}
./bin/bump-galoy-git-ref.sh ${{ github.event.pull_request.head.sha }} ${{ github.event.pull_request.head.repo.clone_url }}
./bin/bump-galoy-image-digest.sh api local
./bin/bump-galoy-image-digest.sh trigger local
./bin/bump-mongodb-migrate-image-digest.sh local
Expand Down
14 changes: 14 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
coverage
dist
tmp
charts
protos
.vscode
quickstart

.github
ci/**/*

**/*.md
**/*.yaml
**/*.yml
6 changes: 5 additions & 1 deletion quickstart/bin/bump-galoy-git-ref.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
#!/bin/bash
git_ref_sha="${1}"
git_url="${2}"

DIR="$(dirname "$(readlink -f "$BASH_SOURCE")")"

TMPDIR=""
TMPDIR=$(mktemp -d -t repipe.XXXXXX)
trap "rm -rf ${TMPDIR}" INT TERM QUIT EXIT

sed "s/^galoy_git_ref:.*/galoy_git_ref: ${1}/" ${DIR}/../vendir/values.yml > ${TMPDIR}/new_values.yml
sed "s|^galoy_git_ref:.*|galoy_git_ref: ${git_ref_sha}|" ${DIR}/../vendir/values.yml > ${TMPDIR}/new_values.yml
mv ${TMPDIR}/new_values.yml ${DIR}/../vendir/values.yml

sed "s|^galoy_repo_url:.*|galoy_repo_url: ${git_url}|" ${DIR}/../vendir/values.yml > ${TMPDIR}/new_values.yml
mv ${TMPDIR}/new_values.yml ${DIR}/../vendir/values.yml
6 changes: 3 additions & 3 deletions quickstart/vendir/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ directories:
contents:
- path: ./
git:
url: https://github.com/GaloyMoney/galoy.git
url: #@ data.values.galoy_repo_url
ref: #@ data.values.galoy_git_ref
includePaths:
- core/api/dev/**/*
Expand All @@ -20,7 +20,7 @@ directories:
contents:
- path: ./
git:
url: https://github.com/GaloyMoney/galoy.git
url: #@ data.values.galoy_repo_url
ref: #@ data.values.galoy_git_ref
includePaths:
- core/api/dev/**/*
Expand All @@ -38,7 +38,7 @@ directories:
contents:
- path: ./
git:
url: https://github.com/GaloyMoney/galoy.git
url: #@ data.values.galoy_repo_url
ref: #@ data.values.galoy_git_ref
includePaths:
- core/api/src/graphql/public/schema.graphql
Expand Down
1 change: 1 addition & 0 deletions quickstart/vendir/values.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#@data/values
---
galoy_git_ref: 955b193d1028d7e34c63ef198e619168399ba098
galoy_repo_url: https://github.com/GaloyMoney/galoy.git
Loading