Skip to content

Commit

Permalink
Workflow debug (#735)
Browse files Browse the repository at this point in the history
* Add workflow debug workflow

b/395119204

* Fix initialize conditional

* Add permissions setting at top level

* Simplify concurrency group setting

* Polish
  • Loading branch information
oxve authored Feb 7, 2025
1 parent 6b97831 commit 49ec3e5
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 7 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
required: false

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ inputs.platform }} @ ${{ github.event.label.name || github.event.pull_request.number || github.sha }} @ ${{ github.event.label.name && github.event.pull_request.number || github.event.action }}
group: ${{ github.workflow }}-${{ inputs.platform }} @ ${{ github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
Expand All @@ -33,12 +33,8 @@ jobs:
GITHUB_PR_REPO_URL: ${{ github.event.pull_request.base.repo.url }}
GITHUB_EVENT_NUMBER: ${{ github.event.number }}
if: |
github.event.action != 'labeled' ||
github.event.pull_request.merged == false &&
(
github.event.action == 'labeled' &&
github.event.label.name == 'runtest'
)
github.event.action != 'labeled' || github.event.pull_request.merged == false &&
(github.event.label.name == 'runtest' || github.event.label.name == 'on_device')
timeout-minutes: 10
steps:
- name: Checkout
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/workflow_debug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Workflow Debug

on:
pull_request:
types: [opened, reopened, synchronize, labeled]
branches:
- main
- experimental/*
- feature/*
push:
branches:
- main
- experimental/*
- feature/*

permissions: {}

jobs:
debug:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Print github context
shell: bash
run: |
echo '${{ toJSON(github) }}' | jq '.'

0 comments on commit 49ec3e5

Please sign in to comment.