Skip to content

Commit

Permalink
Fix sync for dunfell
Browse files Browse the repository at this point in the history
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
  • Loading branch information
superna9999 committed Nov 3, 2023
1 parent c0769d2 commit e95c919
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/scripts/sync.sh
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
22 changes: 22 additions & 0 deletions .github/sync.yml
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

0 comments on commit e95c919

Please sign in to comment.