diff --git a/.github/workflows/merge-from-branch.yml b/.github/workflows/merge-from-branch.yml new file mode 100644 index 00000000..8ace17e9 --- /dev/null +++ b/.github/workflows/merge-from-branch.yml @@ -0,0 +1,55 @@ +name: Merge branch into nightly + +on: + workflow_dispatch: + + workflow_call: + inputs: + branch: + required: true + type: string + secrets: + GPG_KEY2: + required: false + GPG_PASSPHRASE2: + required: false +jobs: + + Merge: + + name: "Merge ${{ inputs.branch }} into nightly" + runs-on: [self-hosted, Linux] + if: ${{ github.repository_owner == 'Armbian' }} + + steps: + + - name: Checkout Armbian build script + uses: actions/checkout@v2 + with: + fetch-depth: 0 + repository: armbian/build + path: build + ref: nightly + clean: false + + - name: Import GPG key + uses: crazy-max/ghaction-import-gpg@v3 + with: + gpg-private-key: ${{ secrets.GPG_KEY2 }} + passphrase: ${{ secrets.GPG_PASSPHRASE2 }} + workdir: build + git-user-signingkey: true + git-commit-gpgsign: true + + - name: Merge master into nightly + + run: | + cd build + git config --global user.email "info@armbian.com" + git config --global user.name "Armbianworker" + git checkout master + git fetch + git merge origin/master + git checkout nightly + git merge master nightly + git push