mirror of
https://github.com/github/codeql-action.git
synced 2026-05-07 22:30:44 +00:00
33 lines
935 B
YAML
33 lines
935 B
YAML
# Mirror changes to this repo to Anthophila/codeql-action
|
|
# whenever a PR is merged into master.
|
|
name: "Mirror to Anthophila/codeql-action"
|
|
|
|
# TODO change to trigger when master branch pushed/PR-merged
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
mirror:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Mirror
|
|
run: |
|
|
# Only run if running on private repo
|
|
if [ "${{ github.event.repository.full_name }}" == "github/codeql-action" ]; then
|
|
# setup deploy key
|
|
mkdir -p ~/.ssh
|
|
echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_rsa
|
|
chmod 600 ~/.ssh/id_rsa
|
|
# add public repo as remote and push to it
|
|
git checkout master
|
|
git remote add public git@github.com:Anthophila/codeql-action.git
|
|
git push public master
|
|
else
|
|
echo "This workflow should only run on github/codeql-action"
|
|
fi
|