-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Brooks Townsend <[email protected]>
- Loading branch information
1 parent
0b0d886
commit 353f4e4
Showing
94 changed files
with
454 additions
and
2,456 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Remove the init workflow so it won't get run more than once | ||
git rm .github/workflows/init.yml | ||
|
||
# Update links in the README | ||
UPSTREAM_REPOSITORY="github.com/${TEMPLATE_REPOSITORY}/compare" | ||
CURRENT_REPOSITORY="github.com/${GITHUB_REPOSITORY}/compare" | ||
sed -i "s|${UPSTREAM_REPOSITORY}|${CURRENT_REPOSITORY}|g" README.md | ||
|
||
# Update the Argo CD Application definition to point to this repository | ||
sed -i "s|${TEMPLATE_REPOSITORY}|${GITHUB_REPOSITORY}|g" setup/argocd-application.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Initialize the repository | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
TEMPLATE_REPOSITORY: cosmonic/concordance-gitops | ||
|
||
jobs: | ||
init: | ||
# Don't run this in the template repository. | ||
if: ${{ github.repository != 'cosmonic/concordance-gitops' }} | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# Give the default GITHUB_TOKEN write permission to commit and push the | ||
# added or changed files to the repository. | ||
contents: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: "main" | ||
|
||
- name: Setup GitHub Actions as the commiter | ||
run: | | ||
git config --local user.name 'github-actions[bot]' | ||
git config --local user.email 'github-actions[bot]@users.noreply.github.com' | ||
# Remove this workflow so it won't run again. | ||
- name: Clean up main | ||
run: | | ||
./.github/init.sh | ||
git add -A | ||
git commit -m "Initialize the repository" | ||
- name: Ensure release branches exist | ||
run: | | ||
release_branches=$(git branch -r | awk '/release/ { gsub(/origin\//, "", $1); print $1 }') | ||
if [ -z "${release_branches}" ]; then | ||
git remote add upstream "https://github.com/${TEMPLATE_REPOSITORY}" | ||
git fetch upstream | ||
upstream_branches=$(git branch -r | awk '/release/ { gsub(/upstream\//, "", $1); print $1 }') | ||
for branch_name in $upstream_branches | ||
do | ||
git checkout --orphan "${branch_name}" "upstream/${branch_name}" | ||
git init . | ||
git commit --message "Initialize ${upstream_branch}" | ||
done | ||
git push --branches | ||
git remote remove upstream | ||
fi | ||
- name: Setup each release branch for pull requests | ||
run: | | ||
release_branches=$(git branch -r | awk '/release/ { gsub(/origin\//, "", $1); print $1 }') | ||
if [ -z "${release_branches}" ]; then | ||
echo "No release branches." | ||
exit 1 | ||
fi | ||
rebase_from='main' | ||
for branch_name in $release_branches | ||
do | ||
git checkout "${branch_name}" | ||
git rebase -X theirs "${rebase_from}" | ||
./.github/init.sh | ||
git add -A | ||
git commit --amend --no-edit | ||
rebase_from=$branch_name | ||
done | ||
git checkout main | ||
git push --all -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,3 +46,6 @@ host_config.json | |
|
||
# rebar lock file | ||
rebar.lock | ||
|
||
# wasm files | ||
*.wasm |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
set shell := ["bash", "-cu"] | ||
|
||
build: | ||
# Ensure events are up-to-date | ||
cd eventcatalog && npm run build | ||
# Build all the actors using `wash build` | ||
for dir in $(find . -type f -name 'Cargo.toml' | xargs -n1 dirname | rg -v node_modules); do \ | ||
echo "Building $dir"; \ | ||
export WASH_ISSUER_KEY=$(pwd)/.keys/bank_issuer.nk; \ | ||
(cd $dir && wash build); \ | ||
done | ||
|
||
version := "0.0.0" | ||
push: | ||
# Push to GHCR | ||
wash push ghcr.io/cosmonic/cosmonic-gitops/bankaccount_catalog:{{version}} eventcatalog/actor/build/bankaccountcatalog_s.wasm |
Oops, something went wrong.