Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge develop into main #18

Merged
merged 3 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 8 additions & 18 deletions .github/workflows/initiate-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to merge into main'
description: 'Target branch'
required: true
default: 'develop'

Expand All @@ -25,27 +25,17 @@ jobs:
token: ${{ env.GITHUB_TOKEN }}
fetch-depth: 0

- name: 🔄 Merge develop into main
- name: 🔄 Create Merge Request
uses: actions/github-script@v7
with:
script: |
github.rest.repos.merge({
github.rest.pulls.create({
owner: context.repo.owner,
repo: context.repo.repo,
base: 'main',
head: '${{ github.event.inputs.branch }}',
base: 'main',
title: 'Merge ${{ github.event.inputs.branch }} into main',
body: 'Automatically created merge request from workflow',
maintainer_can_modify: true
});

# Push from Action does not trigger subsequent action
# https://github.com/orgs/community/discussions/25702
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#repository_dispatch
- name: 🔄 Trigger Publish Workflow
uses: actions/github-script@v7
with:
script: |
github.rest.repos.createDispatchEvent({
owner: context.repo.owner,
repo: context.repo.repo,
event_type: 'publish-trigger',
client_payload: {}
});

3 changes: 0 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ on:
push:
branches:
- main
# Note: Runs on the default branch so develop (Thus e.g. github.ref is develop)
repository_dispatch:
types: [publish-trigger]
workflow_dispatch:

concurrency: ${{ github.workflow }}-${{ github.ref }}
Expand Down