Skip to content

Commit

Permalink
Update GitHub workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell committed Feb 28, 2023
1 parent a276ffc commit 396cc5e
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 80 deletions.
26 changes: 13 additions & 13 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
name-template: '$RESOLVED_VERSION'
tag-template: '$RESOLVED_VERSION'
categories:
- title: '🚨 Significant changes'
labels:
- 'Major change'
- 'Minor change'
- title: '🚨 Major changes'
label: 'breaking change'
- title: '🚀 Enhancements'
label: 'Enhancement'
label: 'enhancement'
- title: '🐛 Bug Fixes'
label: 'Bug'
include-labels:
- 'Major change'
- 'Minor change'
- 'Enhancement'
- 'Bug'
label: 'bug'
- title: '🧰 Maintenance'
label: 'chore'
- title: '🧰 Dependency updates'
label: 'dependencies'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'Major change'
- 'breaking change'
minor:
labels:
- 'Minor change'
- 'enhancement'
patch:
labels:
- 'bug'
default: patch
template: |
## What's new since $PREVIOUS_TAG
Expand Down
38 changes: 8 additions & 30 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,16 @@
name: Merge dependency updates

on:
workflow_run:
types:
- "completed"
workflows:
- "ORCA CI"

permissions:
contents: write
pull-requests: write

jobs:
merge:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
if: >-
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.actor.login == 'dependabot[bot]'
steps:
- name: "Get PR information"
uses: potiuk/get-workflow-origin@v1_4
id: source-run-info
with:
token: ${{ secrets.GITHUB_TOKEN }}
sourceRunId: ${{ github.event.workflow_run.id }}
- run: 'gh pr merge --squash https://github.com/$GITHUB_REPOSITORY/pull/$GITHUB_PR'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR: ${{ steps.source-run-info.outputs.pullRequestNumber }}
update_release_draft:
needs: merge
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
call-workflow:
uses: acquia/cli/.github/workflows/automerge.yml@main
35 changes: 7 additions & 28 deletions .github/workflows/jira.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,14 @@
name: Sync GitHub issues to Jira

on:
issues:
types:
- opened
- closed

name: Create new tickets in Jira
permissions:
issues: write

jobs:
build:
runs-on: ubuntu-latest
name: Create new tickets in Jira
permissions:
issues: write
steps:
- name: Login
uses: acquia/gajira-login@bearer
env:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
- name: Create
id: create
uses: acquia/gajira-create@bearer
with:
project: DX
issuetype: Task
summary: ${{ github.event.issue.title }}
description: ${{ github.event.issue.html_url }}
fields: '{"components": [{"id": "26026"}]}'
- name: Update Github issue with Jira ticket prefix
run: 'gh issue edit $GH_ISSUE --title "$JIRA_ISSUE: $ISSUE_TITLE"'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_ISSUE: ${{ github.event.issue.html_url }}
JIRA_ISSUE: ${{ steps.create.outputs.issue }}
ISSUE_TITLE: ${{ github.event.issue.title }}
call-workflow:
uses: acquia/cli/.github/workflows/jira.yml@main
17 changes: 8 additions & 9 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ on:
push:
branches:
- main
pull_request_target:
types: [opened, synchronize, reopened, labeled, unlabeled]

permissions:
contents: write
pull-requests: write

jobs:
update_release_draft:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: read
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
call-workflow:
uses: acquia/cli/.github/workflows/release-drafter.yml@main

0 comments on commit 396cc5e

Please sign in to comment.