Skip to content

Commit

Permalink
chore(merge): merge #200 into main
Browse files Browse the repository at this point in the history
  • Loading branch information
sbertix authored May 11, 2021
2 parents 759c6d5 + c2c3da4 commit 4492b4a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 39 deletions.
21 changes: 4 additions & 17 deletions .github/workflows/chatops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,16 @@ on:
types: [created]

jobs:
workflows:
name: ChatOps (Workflows)
chatops:
name: ChatOps
runs-on: ubuntu-latest
if: ${{ github.event.pull_request }}

steps:
# launch workflows with specific instructions.
- name: ChatOps (Repository)
- name: ChatOps
uses: peter-evans/slash-command-dispatch@v2
with:
token: ${{ secrets.CHATOPS_PAT }}
dispatch_type: workflow
commands: |
test
static-args: |
repo=${{ github.pull_request.head.repo.full_name }}
head=${{ github.pull_request.head.sha }}
base=${{ github.pull_request.base.sha }}
dispatch-type: workflow
# append error message.
- name: Edit comment with error message
if: steps.scd.outputs.error-message
uses: peter-evans/create-or-update-comment@v1
with:
comment-id: ${{ github.event.comment.id }}
body: |
> ${{ steps.scd.outputs.error-message }}
13 changes: 6 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: merge
name: release

on:
push:
Expand All @@ -10,7 +10,6 @@ jobs:
rebase:
name: Rebase
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.merged == true }}

steps:
# checkout.
Expand All @@ -26,26 +25,26 @@ jobs:
run: |
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions"
git fetch --all
# rebase `bugfixes`.
- name: Rebase `bugfixes`
run: |
git checkout -b bugfixes origin/bugfixes
git rebase origin/main
git checkout bugfixes
git rebase main
git push origin bugfixes --force-with-lease
continue-on-error: true
# rebase `development`.
- name: Rebase `development`
run: |
git checkout -b development origin/development
git rebase origin/main
git checkout development
git rebase main
git push origin development --force-with-lease
continue-on-error: true

# release a new version.
release:
name: Release
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.merged == true }}

steps:
# checkout `main`.
Expand Down
22 changes: 7 additions & 15 deletions .github/workflows/test-command.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
name: test

on:
workflow_dispatch:
inputs:
repo:
description: ''
required: true
head:
description: ''
required: true
base:
description: ''
required: true
repository_dispatch:
types:
- test-command

jobs:
test:
Expand All @@ -24,14 +16,14 @@ jobs:
uses: actions/checkout@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.event.inputs.repo }}
ref: ${{ github.event.inputs.head }}
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
ref: ${{ github.event.client_payload.pull_request.head.sha }}
# filter updates.
- uses: dorny/paths-filter@v2
id: changes
with:
base: ${{ github.event.inputs.base }}
ref: ${{ github.event.inputs.head }}
base: ${{ github.event.client_payload.pull_request.base.sha }}
ref: ${{ github.event.client_payload.pull_request.head.sha }}
filters: |
src:
- '**/*.swift'
Expand Down

0 comments on commit 4492b4a

Please sign in to comment.