File tree Expand file tree Collapse file tree 2 files changed +42
-2
lines changed Expand file tree Collapse file tree 2 files changed +42
-2
lines changed Original file line number Diff line number Diff line change @@ -88,15 +88,19 @@ jobs:
88
88
cancel-in-progress : true
89
89
needs :
90
90
- check_if_version_upgraded
91
+ <<<<<<< HEAD
91
92
if : needs.check_if_version_upgraded.outputs.is_upgraded_in_preprod == 'true'
93
+ =======
94
+ if : needs.check_if_version_upgraded.outputs.is_upgraded_version == 'true'
95
+ >>>>>>> 0b3f684d (ci: add script to automatically update the project from upstream every day)
92
96
env :
93
97
TO_VERSION : ${{ needs.check_if_version_upgraded.outputs.to_version }}
94
98
steps :
95
99
- run : echo "Triggering production deploy"
96
100
- name : Set up SSH
97
101
run : |
98
102
mkdir -p ~/.ssh
99
- echo "${{ secrets. SSH_PRIVATE_KEY }} " > ~/.ssh/id_ed25519
103
+ echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
100
104
chmod 600 ~/.ssh/id_ed25519
101
105
ssh-keyscan code.gouv.fr >> ~/.ssh/known_hosts
102
106
@@ -128,14 +132,15 @@ jobs:
128
132
needs :
129
133
- trigger_pre_production_deploy
130
134
- check_if_version_upgraded
135
+ if : needs.check_if_version_upgraded.outputs.is_upgraded_version == 'true'
131
136
env :
132
137
TO_VERSION : ${{ needs.check_if_version_upgraded.outputs.to_version }}
133
138
steps :
134
139
- run : echo "Triggering production deploy"
135
140
- name : Set up SSH
136
141
run : |
137
142
mkdir -p ~/.ssh
138
- echo "${{ secrets. SSH_PRIVATE_KEY }} " > ~/.ssh/id_ed25519
143
+ echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
139
144
chmod 600 ~/.ssh/id_ed25519
140
145
ssh-keyscan code.gouv.fr >> ~/.ssh/known_hosts
141
146
ssh -o StrictHostKeyChecking=no [email protected] "bash -c 'eval \"\$(ssh-agent -s)\" && ssh-add ~/.ssh/sill-data && ./update-sill-docker-compose.sh v${{ env.TO_VERSION }}'"
Original file line number Diff line number Diff line change
1
+ name : Sync upstream
2
+
3
+ on :
4
+ schedule :
5
+ - cron : ' 0 7 * * *' # every day at 7 AM UTC
6
+ workflow_dispatch :
7
+
8
+ jobs :
9
+ sync :
10
+ name : Sync repository with upstream repository
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Checkout fork
14
+ uses : actions/checkout@v4
15
+ with :
16
+ token : ${{ secrets.PAT_FOR_UPSTREAM_SYNC }}
17
+ fetch-depth : 0
18
+
19
+ - name : Configure Git
20
+ run : |
21
+ git config user.name "github-actions[bot]"
22
+ git config user.email "github-actions[bot]@users.noreply.github.com"
23
+
24
+ - name : Add upstream remote
25
+ run : |
26
+ git remote add upstream https://github.com/codegouvfr/sill.git
27
+ git fetch upstream
28
+
29
+ - name : Sync with upstream/main
30
+ run : |
31
+ git checkout main
32
+ git rebase upstream/main
33
+
34
+ - name : Push to origin
35
+ run : git push origin main --force-with-lease --no-verify
You can’t perform that action at this time.
0 commit comments