aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorWouter Admiraal <wouter.admiraal@sonarsource.com>2020-02-25 09:03:32 +0100
committerSonarTech <sonartech@sonarsource.com>2020-02-26 10:41:19 +0100
commit97956bd992c2c949ea4dd69abaab4982521ba56d (patch)
tree166e562968e0640f52bbc45ffa2bcca117dc1575 /.github
parent1c870c915125912fec3569cf283b58a2a35281a5 (diff)
downloadsonarqube-97956bd992c2c949ea4dd69abaab4982521ba56d.tar.gz
sonarqube-97956bd992c2c949ea4dd69abaab4982521ba56d.zip
BUILD-757 Sync private and public repos
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/sync-lts-branch.yml30
-rw-r--r--.github/workflows/sync-master-branch.yml30
2 files changed, 60 insertions, 0 deletions
diff --git a/.github/workflows/sync-lts-branch.yml b/.github/workflows/sync-lts-branch.yml
new file mode 100644
index 00000000000..4cfaea70823
--- /dev/null
+++ b/.github/workflows/sync-lts-branch.yml
@@ -0,0 +1,30 @@
+name: Sync LTS branch
+on:
+ schedule:
+ # at 20:00 daily
+ - cron: "0 20 * * *"
+jobs:
+ sync_lts:
+ # prevent job to run on public repository sonarsource/sonarqube
+ if: github.repository == 'sonarsource/sonar-enterprise'
+ runs-on: ubuntu-latest
+ name: Sync LTS branch of sonarsource/sonar-enterprise with sonarsource/sonarqube
+ steps:
+ - name: Fetch code
+ uses: actions/checkout@v2
+ with:
+ token: ${{ secrets.GITHUB_ORG_TOKEN }}
+ ref: master
+ path: repo
+ - name: Sync LTS branch
+ run: ./repo/private/sync-public-git-branches.sh
+ env:
+ GITHUB_ORG_TOKEN: ${{ secrets.GITHUB_ORG_TOKEN }}
+ BRANCH_NAME: branch-7.9
+ - name: Notify failures on Slack
+ if: failure()
+ uses: Ilshidur/action-slack@2.0.0
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
+ with:
+ args: "Nightly public sync failed, see the logs at https://github.com/SonarSource/sonar-enterprise/actions"
diff --git a/.github/workflows/sync-master-branch.yml b/.github/workflows/sync-master-branch.yml
new file mode 100644
index 00000000000..0542b061b51
--- /dev/null
+++ b/.github/workflows/sync-master-branch.yml
@@ -0,0 +1,30 @@
+name: Sync master branch
+on:
+ schedule:
+ # at 20:00 daily
+ - cron: "0 20 * * *"
+jobs:
+ sync_master:
+ # prevent job to run on public repository sonarsource/sonarqube
+ if: github.repository == 'sonarsource/sonar-enterprise'
+ runs-on: ubuntu-latest
+ name: Sync master branch of sonarsource/sonar-enterprise with sonarsource/sonarqube
+ steps:
+ - name: Fetch code
+ uses: actions/checkout@v2
+ with:
+ token: ${{ secrets.GITHUB_ORG_TOKEN }}
+ ref: master
+ path: repo
+ - name: Sync master branch
+ run: ./repo/private/sync-public-git-branches.sh
+ env:
+ GITHUB_ORG_TOKEN: ${{ secrets.GITHUB_ORG_TOKEN }}
+ BRANCH_NAME: master
+ - name: Notify failures on Slack
+ if: failure()
+ uses: Ilshidur/action-slack@2.0.0
+ env:
+ SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
+ with:
+ args: "Nightly public sync failed, see the logs at https://github.com/SonarSource/sonar-enterprise/actions"