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

feat: test workload triggered #52

Closed
wants to merge 34 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
393c27d
test trigger approve workflow
marshacb Sep 12, 2023
74ba365
test approval workflow
marshacb Sep 13, 2023
85ae44a
test auto approval
marshacb Sep 13, 2023
fee4544
add github token
marshacb Sep 13, 2023
0c11a8a
add pull request target
marshacb Sep 13, 2023
70755c9
update on condition
marshacb Sep 13, 2023
61bac2b
update pull request target types
marshacb Sep 13, 2023
de1940c
test pull request target to allow workload secrets
marshacb Sep 13, 2023
2fc0093
remove checkout
marshacb Sep 13, 2023
5bfc02f
add branches to pr target
marshacb Sep 13, 2023
19d342f
test workflow using pr target
marshacb Sep 13, 2023
96b4081
update pr target with additonal types
marshacb Sep 13, 2023
e77711e
add edited to types
marshacb Sep 13, 2023
f202be5
add synchronize to pr target
marshacb Sep 13, 2023
3c2655e
update approval pr target
marshacb Sep 13, 2023
7800600
update workload name
marshacb Sep 13, 2023
a723ec9
update approve yml
marshacb Sep 13, 2023
b8a3a68
test pr approve
marshacb Sep 13, 2023
d390fe9
change approve to approval
marshacb Sep 13, 2023
7d8f03e
test semantic removal
marshacb Sep 13, 2023
9ce9eac
readd semantic
marshacb Sep 13, 2023
b357ad8
test on pull request
marshacb Sep 13, 2023
03d3dfc
revert approval to approve
marshacb Sep 13, 2023
d8606b0
add name to commit job
marshacb Sep 13, 2023
5f8f56f
test approval under semantic pull_request_target
marshacb Sep 13, 2023
3d47c72
test approval under semantic pull_request_target without if
marshacb Sep 13, 2023
a2dc9d9
test approve as part of validate title
marshacb Sep 13, 2023
539aec6
update approve yml
marshacb Sep 13, 2023
1027103
test pr read permissions
marshacb Sep 13, 2023
a031f31
update approve yml
marshacb Sep 13, 2023
7a13641
add types to pull request target
marshacb Sep 13, 2023
18b0a8d
log event name
marshacb Sep 13, 2023
d51c800
test cognitedata action
marshacb Sep 13, 2023
2149cc2
remove if condition
marshacb Sep 13, 2023
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
94 changes: 10 additions & 84 deletions .github/workflows/approve.yml
Original file line number Diff line number Diff line change
@@ -1,88 +1,14 @@
name: pr
name: Auto approve PRs by dependabot

on:
pull_request:
branches:
- main
# Trigger the workflow on pull request
on: pull_request_target

jobs:
commit-and-approve:
jobs:
autoapprove:
name: Auto-Approve a PR by dependabot
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: add automerge label
uses: actions-ecosystem/action-add-labels@v1
with:
labels: automerge

- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Automated Registry Update
file_pattern: '*.json'
disable_globbing: true

auto-approve:
name: 'Auto Approve PR'
runs-on: ubuntu-latest
permissions:
pull-requests: write
if: github.actor == 'dependabot[bot]' || github.actor == 'TarikGul' || github.actor == 'marshacb'
steps:
- run: echo github actor is ${{github.actor}}
- uses: hmarr/auto-approve-action@v3
with:
review-message: 'Auto approved PR'

automerge:
name: 'Auto Merge PR'
runs-on: ubuntu-latest
needs: auto-approve
steps:
- id: automerge
name: automerge
uses: "pascalgn/[email protected]"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
MERGE_METHOD: "squash"
MERGE_COMMIT_MESSAGE: "chore: scheduled registry update"
MERGE_RETRY_SLEEP: "10000"
MERGE_REQUIRED_APPROVALS: "0"

delete-latest-release:
permissions:
contents: write

name: "Remove Latest Release"
runs-on: "ubuntu-latest"
needs: automerge

steps:
- uses: dev-drprasad/[email protected] # PRERELEASE is v1.0 and can also be used to test and give us feedback
with:
tag_name: latest #(required) tag name to delete
github_token: ${{ secrets.GITHUB_TOKEN }} # (required) a GitHub token with write access to the repo that needs to be modified
delete_release: true #(optional) default: true

publish-latest-release:
permissions:
contents: write

name: "Github Release"
runs-on: "ubuntu-latest"
needs: delete-latest-release

steps:
- uses: actions/checkout@v3
- uses: ncipollo/release-action@v1
with:
tag: "latest"
commit: "main"


- name: Auto approve
uses: cognitedata/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/semantic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
name: Validate PR Title
runs-on: ubuntu-latest
steps:
- run: echo event name ${{github.event_name}}
- name: semantic-pull-request
uses: amannn/action-semantic-pull-request@v5
env:
Expand Down