From 701299c3feeef53b57a46e611affdc78442a249e Mon Sep 17 00:00:00 2001 From: cidrblock Date: Tue, 13 Oct 2020 09:01:43 -0700 Subject: [PATCH 1/2] Add runs-on to publish --- .github/workflows/publish.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cf9e7bf..4005141 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,6 +7,7 @@ on: jobs: publish: name: Publish to galaxy + runs-on: ubuntu-latest steps: - name: Check out code uses: actions/checkout@v2 @@ -23,7 +24,7 @@ jobs: env: VERSION: ${{ github.event.release.tag_name }} run: | - sed 's/{{ version }}/'$VERSION'/' galaxy.yml + sed 's/0.0.0/'$VERSION'/' galaxy.yml cat galaxy.yml # - name: Build and publish From b5bcdf7ac7853d9641917c9352b4040088a0aafc Mon Sep 17 00:00:00 2001 From: cidrblock Date: Tue, 13 Oct 2020 13:56:57 -0700 Subject: [PATCH 2/2] Add merge on gate --- .github/workflows/merge_on_gate.yml | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/merge_on_gate.yml diff --git a/.github/workflows/merge_on_gate.yml b/.github/workflows/merge_on_gate.yml new file mode 100644 index 0000000..9939216 --- /dev/null +++ b/.github/workflows/merge_on_gate.yml @@ -0,0 +1,34 @@ +name: Merge a pull request +on: + pull_request: + branches: + - main + types: [labeled] + +jobs: + merge: + if: | + github.event.label.name == 'gate' + name: merge + runs-on: ubuntu-latest + steps: + - name: Install gh + run: | + sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0 + sudo apt-add-repository https://cli.github.com/packages + sudo apt update + sudo apt install gh + + - name: Check out code + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Checkout default branch and merge PR + env: + DEFAULT_BRANCH: ${{ github.event.repository.default_branch }} + PR: ${{ github.event.number }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git checkout $DEFAULT_BRANCH + gh pr merge $PR --squash \ No newline at end of file