-
Notifications
You must be signed in to change notification settings - Fork 72
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: Neil Armstrong <neil.armstrong@linaro.org>
- Loading branch information
1 parent
c0769d2
commit e95c919
Showing
2 changed files
with
35 additions
and
0 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,13 @@ | ||
#!/bin/bash | ||
|
||
mkdir --parents "$HOME/.ssh" | ||
DEPLOY_KEY_FILE="$HOME/.ssh/deploy_key" | ||
echo "${SSH_PUSH_KEY}" > "$DEPLOY_KEY_FILE" | ||
chmod 600 "$DEPLOY_KEY_FILE" | ||
|
||
SSH_KNOWN_HOSTS_FILE="$HOME/.ssh/known_hosts" | ||
ssh-keyscan -H "$1" > "$SSH_KNOWN_HOSTS_FILE" | ||
|
||
export GIT_SSH_COMMAND="ssh -i "$DEPLOY_KEY_FILE" -o UserKnownHostsFile=$SSH_KNOWN_HOSTS_FILE" | ||
|
||
git push --all --force $2 |
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,22 @@ | ||
name: Sync to gitlab (master) | ||
|
||
on: | ||
push: | ||
branches: | ||
- dunfell | ||
schedule: | ||
- cron: 0 8 * * * | ||
|
||
jobs: | ||
sync: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Push to gitlab | ||
env: | ||
SSH_PUSH_KEY: ${{ secrets.SSH_PUSH_KEY }} | ||
run: ./.github/scripts/sync.sh gitlab.com git@gitlab.com:superna9999/meta-meson.git | ||
shell: bash |