Created
November 22, 2022 06:58
-
-
Save maxwellb/2001e496b5f0eb43733fc571934e86d7 to your computer and use it in GitHub Desktop.
Update my repos in GitHub to remain in sync with the upstream projects
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
.. |
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
## Update my repos in GitHub to remain in sync with the upstream projects | |
variables: | |
- group: Sensitive Values | |
pool: | |
vmImage: ubuntu-latest | |
schedules: | |
- cron: 0 12 * * * | |
displayName: Daily | |
always: true | |
branches: | |
include: | |
- master | |
stages: | |
- stage: start | |
displayName: Start | |
jobs: | |
- job: default | |
steps: | |
- bash: | | |
echo "Get the party started" | |
- stage: sync | |
displayName: Sync Repos with Upstream | |
dependsOn: start | |
jobs: | |
- job: sync | |
strategy: | |
matrix: | |
akka.net: | |
REPO: akka.net | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/akkadotnet/akka.net.git | |
SSHP: $(cicd-rsa) | |
BRANCHES: dev | |
Akka.Persistence.Cassandra: | |
REPO: Akka.Persistence.Cassandra | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/akkadotnet/Akka.Persistence.Cassandra.git | |
SSHP: $(cicd-rsa) | |
BRANCHES: dev master | |
Akka.Persistence.MongoDB: | |
REPO: Akka.Persistence.MongoDB | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/akkadotnet/Akka.Persistence.MongoDB.git | |
SSHP: $(cicd-rsa) | |
BRANCHES: dev master | |
Akka.TestKit.Nunit: | |
REPO: Akka.TestKit.Nunit | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/AkkaNetContrib/Akka.TestKit.Nunit.git | |
SSHP: $(cicd-rsa) | |
BRANCHES: dev master | |
Akka.TestKit.VsTest: | |
REPO: Akka.TestKit.VsTest | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/AkkaNetContrib/Akka.TestKit.VsTest.git | |
SSHP: $(cicd-rsa) | |
BRANCHES: dev master | |
akkadotnet-bootstrap: | |
REPO: akkadotnet-bootstrap | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/petabridge/akkadotnet-bootstrap.git | |
SSHP: $(cicd-rsa) | |
BRANCHES: dev | |
ccm: | |
REPO: ccm | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/riptano/ccm.git | |
SSHP: $(cicd-rsa) | |
chromeos_azure_file_share: | |
REPO: chromeos_azure_file_share | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/GoogleChromeLabs/chromeos_network_file_share.git | |
SSHP: $(cicd-rsa) | |
compose: | |
REPO: compose | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/docker/compose.git | |
SSHP: $(cicd-rsa) | |
csharp-driver: | |
REPO: csharp-driver | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/datastax/csharp-driver.git | |
SSHP: $(cicd-rsa) | |
donuts.node: | |
REPO: donuts.node | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/microsoft/donuts.node.git | |
SSHP: $(cicd-rsa) | |
dotnet-docs: | |
REPO: dotnet-docs | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/dotnet/docs.git | |
SSHP: $(cicd-rsa) | |
BRANCHES: main | |
dotnet-samples: | |
REPO: dotnet-samples | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/dotnet/samples.git | |
SSHP: $(cicd-rsa) | |
ffmpeg: | |
REPO: FFmpeg | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/FFmpeg/FFmpeg.git | |
SSHP: $(cicd-rsa) | |
BRANCHES: master release/4.3 release/3.4 | |
generator-akkadotnet: | |
REPO: generator-akkadotnet | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/akkadotnet/generator-akkadotnet.git | |
SSHP: $(cicd-rsa) | |
hrx: | |
REPO: hrx | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/google/hrx.git | |
SSHP: $(cicd-rsa) | |
infinite-key-generator: | |
REPO: infinite-key-generator | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/signicode/infinite-key-generator.git | |
SSHP: $(cicd-rsa) | |
jus: | |
REPO: jus | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/jus/jus.git | |
SSHP: $(cicd-rsa) | |
keystone-storage-adapter-azure: | |
REPO: keystone-storage-adapter-azure | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/keystonejs/keystone-storage-adapter-azure.git | |
SSHP: $(cicd-rsa) | |
konterball: | |
REPO: konterball | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/madebywild/konterball.git | |
SSHP: $(cicd-rsa) | |
meshblu: | |
REPO: konterball | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/octoblu/meshblu.git | |
SSHP: $(cicd-rsa) | |
Microsoft.IO.RecyclableMemoryStream: | |
REPO: Microsoft.IO.RecyclableMemoryStream | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/microsoft/Microsoft.IO.RecyclableMemoryStream.git | |
SSHP: $(cicd-rsa) | |
monaco-mediawiki: | |
REPO: monaco-mediawiki | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/imbushuo/monaco-mediawiki.git | |
SSHP: $(cicd-rsa) | |
open-api: | |
REPO: open-api | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/kogosoftwarellc/open-api.git | |
SSHP: $(cicd-rsa) | |
Oryx: | |
REPO: Oryx | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/microsoft/Oryx.git | |
SSHP: $(cicd-rsa) | |
rdm-asyncfuture: | |
REPO: rdm-asyncfuture | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/benlau/asyncfuture.git | |
SSHP: $(cicd-rsa) | |
rdm-breakpad: | |
REPO: rdm-breakpad | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/google/breakpad.git | |
SSHP: $(cicd-rsa) | |
rdm-CrashReporter: | |
REPO: rdm-CrashReporter | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/RedisDesktop/CrashReporter.git | |
SSHP: $(cicd-rsa) | |
rdm-easyloggingpp: | |
REPO: rdm-easyloggingpp | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/zuhd-org/easyloggingpp.git | |
SSHP: $(cicd-rsa) | |
rdm-hiredis: | |
REPO: rdm-hiredis | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/redis/hiredis.git | |
SSHP: $(cicd-rsa) | |
rdm-libssh2: | |
REPO: rdm-libssh2 | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/libssh2/libssh2.git | |
SSHP: $(cicd-rsa) | |
rdm-native-value-formatters: | |
REPO: rdm-native-value-formatters | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/RedisDesktop/rdm-native-value-formatters.git | |
SSHP: $(cicd-rsa) | |
rdm-qredisclient: | |
REPO: rdm-qredisclient | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/uglide/qrediscliente.git | |
SSHP: $(cicd-rsa) | |
rdm-qsshclient: | |
REPO: rdm-qsshclient | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/uglide/qsshclient.git | |
SSHP: $(cicd-rsa) | |
rdm-qt-unix-signals: | |
REPO: rdm-qt-unix-signals | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/nyalldawson/qt-unix-signals | |
SSHP: $(cicd-rsa) | |
RedisDesktopManager: | |
REPO: RedisDesktopManager | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/uglide/RedisDesktopManager.git | |
SSHP: $(cicd-rsa) | |
BRANCHES: "2020 2019" | |
ssh2: | |
REPO: ssh2 | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/mscdex/ssh2.git | |
SSHP: $(cicd-rsa) | |
tigerbrew: | |
REPO: tigerbrew | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/mistydemeo/tigerbrew.git | |
SSHP: $(cicd-rsa) | |
unity: | |
REPO: unity | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/unitycontainer/unity.git | |
SSHP: $(cicd-rsa) | |
voldemort: | |
REPO: voldemort | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/voldemort/voldemort.git | |
SSHP: $(cicd-rsa) | |
winforms: | |
REPO: winforms | |
USER: maxwellb | |
HOST: [email protected] | |
ORIGIN: github.com | |
UPSTREAM: github.com | |
FORK: https://github.com/dotnet/winforms.git | |
SSHP: $(cicd-rsa) | |
steps: | |
- task: DownloadSecureFile@1 | |
displayName: Get SSH key | |
name: ssh_key | |
inputs: | |
secureFile: cicd_rsa | |
- bash: | | |
eval "$(ssh-agent)" | |
chmod 0600 $(ssh_key.secureFilePath) | |
echo ${SSHP} | ssh-add $(ssh_key.secureFilePath) | |
resolv() { | |
dig "${1}" | grep -v '^;' | grep 'IN.*A' | awk '{ print $5 }' | |
} | |
addhost() { | |
mkdir -p ~/.ssh | |
ssh-keyscan -H ${1} | tee -a ~/.ssh/known_hosts | |
ssh-keyscan -H $(resolv ${1}) | tee -a ~/.ssh/known_hosts | |
ssh-keyscan -H ${1},$(resolv ${1}) | tee -a ~/.ssh/known_hosts | |
chmod 0600 ~/.ssh/known_hosts | |
} | |
addhost ${ORIGIN} | |
addhost ${UPSTREAM} | |
if (echo "${BRANCHES}" | grep '^\$'); then | |
BRANCHES="" | |
fi | |
git clone "${HOST}:${USER}/${REPO}.git" src | |
cd src | |
git checkout --detach | |
git remote add upstream "${FORK}" | |
git fetch upstream | |
for branch in ${BRANCHES:-master}; do | |
echo "Remote upstream:${branch} is $(git log --oneline ${branch}..upstream/${branch} | wc -l) ahead" | |
echo "Remote upstream:${branch} is $(git log --oneline upstream/${branch}..${branch} | wc -l) behind" | |
git fetch . upstream/${branch}:${branch} | |
git push origin "${branch}" | |
done | |
env: | |
REPO: $(REPO) | |
USER: $(USER) | |
HOST: $(HOST) | |
ORIGIN: $(ORIGIN) | |
UPSTREAM: $(UPSTREAM) | |
FORK: $(FORK) | |
SSHP: $(SSHP) | |
BRANCHES: $(BRANCHES) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment