-
Notifications
You must be signed in to change notification settings - Fork 104
39 lines (32 loc) · 1.17 KB
/
push-to-upstream.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Workflow manually triggered to push fork to upstream
name: Push to upstream
on:
workflow_dispatch:
inputs:
name:
description: 'Push PR to upstream <username>:<branch>'
default: ''
required: true
jobs:
push:
runs-on: ubuntu-latest
steps:
- name: push-upstream
run: |
eval "$(ssh-agent -s)"
ssh-add - <<< "${{ secrets.GH_ACTION_SSH_KEY }}"
mkdir -p ~/.ssh
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
git config --global user.name "Github Action"
git config --global user.email "gh-action+bigquery-etl@mozilla.com"
mkdir bin
GPF_INSTALL_LOCATION=bin/git-push-fork-to-upstream-branch
GPF_URL=https://raw.githubusercontent.com/mozilla/git-push-fork-to-upstream-branch/master/git-push-fork-to-upstream-branch
sudo curl -sL $GPF_URL > $GPF_INSTALL_LOCATION
chmod 755 $GPF_INSTALL_LOCATION
export GPF_USE_SSH=true
git clone git@github.com:mozilla/bigquery-etl.git
cd bigquery-etl
../bin/git-push-fork-to-upstream-branch \
git@github.com:mozilla/bigquery-etl.git \
${{ github.event.inputs.name }}