Skip to content

Commit

Permalink
Update github workflows
Browse files Browse the repository at this point in the history
Signed-off-by: Guvenc Gulce <[email protected]>
  • Loading branch information
guvenc committed Nov 30, 2023
1 parent d7d2d20 commit a220fb0
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 22 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/checkpatch.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: checkpatch

on:
pull_request_target:
pull_request:
paths-ignore:
- 'docs/**'
- '**/*.md'
Expand All @@ -13,9 +13,7 @@ on:

jobs:
checkpatch:
runs-on:
labels: self-hosted
group: organization/default
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/publish-docker-tester.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,23 @@ on:
paths-ignore:
- 'docs/**'
- '**/*.md'
pull_request_target:
pull_request:
paths-ignore:
- 'docs/**'
- '**/*.md'

jobs:
buildAndPushTester:
runs-on:
labels: self-hosted
group: organization/default
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'release' && github.ref || github.event_name == 'push' && github.ref || github.event_name == 'pull_request_target' && github.event.pull_request.head.ref || github.event_name == 'pull_request' && github.event.pull_request.head.ref }}
ref: ${{ github.event_name == 'release' && github.ref || github.event_name == 'push' && github.ref || github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.event_name == 'pull_request' && github.event.pull_request.head.ref }}
fetch-depth: 0
- name: Determine SHA for Docker Image
id: get_sha
run: |
if [[ "${{ github.event_name }}" == "pull_request_target" ]]; then
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "DOCKER_IMAGE_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
else
echo "DOCKER_IMAGE_SHA=${{ github.sha }}" >> $GITHUB_ENV
Expand Down Expand Up @@ -95,7 +93,7 @@ jobs:
- name: Determine SHA for Docker Image
id: get_sha
run: |
if [[ "${{ github.event_name }}" == "pull_request_target" ]]; then
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "DOCKER_IMAGE_SHA=${{ github.event.pull_request.head.sha }}" >> $GITHUB_ENV
else
echo "DOCKER_IMAGE_SHA=${{ github.sha }}" >> $GITHUB_ENV
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,18 @@ on:
paths-ignore:
- 'docs/**'
- '**/*.md'
pull_request_target:
pull_request:
paths-ignore:
- 'docs/**'
- '**/*.md'

jobs:
buildAndPush:
runs-on:
labels: self-hosted
group: organization/default
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'release' && github.ref || github.event_name == 'push' && github.ref || github.event_name == 'pull_request_target' && github.event.pull_request.head.ref || github.event_name == 'pull_request' && github.event.pull_request.head.ref }}
ref: ${{ github.event_name == 'release' && github.ref || github.event_name == 'push' && github.ref || github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.event_name == 'pull_request' && github.event.pull_request.head.ref }}
- uses: docker/metadata-action@v5
id: meta
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- main
pull_request_target:
pull_request:
types: [ opened, reopened, synchronize ]

jobs:
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/size-label.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
name: Size Label

on:
pull_request_target:
types: [ assigned, opened, synchronize, reopened ]
pull_request:
types:
- opened
- edited
- synchronize

jobs:
size-label:
runs-on:
labels: self-hosted
group: organization/default
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: size-label
uses: pascalgn/[email protected]
Expand Down

0 comments on commit a220fb0

Please sign in to comment.