-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.14 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Create a Pull Request
on:
push:
branches:
- 'image-updater-**'
pull_request:
types: [closed]
jobs:
createPullRequest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Extract branch name
if: github.event_name == 'push'
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Create Pull Request
if: github.event_name == 'push'
id: cpr
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.workflows }}
committer: GitHub <[email protected]>
commit-message: Update container image
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
title: 'image updater PR'
assignees: erkerb4
reviewers: erkerb4
base: ${{ steps.extract_branch.outputs.branch }}
branch: main
- name: delete branch
if: github.event_name == 'pull_request'
uses: SvanBoxel/delete-merged-branch@main
env:
GITHUB_TOKEN: ${{ secrets.workflows }}