Skip to content

Commit 586d21e

Browse files
committed
udpate a.
1 parent d49f06a commit 586d21e

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/docker-build.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
tags:
77
- 'v*'
88
- 'release-*'
9+
pull_request:
10+
types: [labeled]
911
workflow_dispatch:
1012
inputs:
1113
ref:
@@ -31,12 +33,16 @@ permissions:
3133
jobs:
3234
build:
3335
runs-on: buildjet-16vcpu-ubuntu-2204
36+
# Only run if it's not a PR event, or if it's a PR with the movement-docker-build label
37+
if: |
38+
github.event_name != 'pull_request' ||
39+
(github.event_name == 'pull_request' && github.event.label.name == 'movement-docker-build')
3440
steps:
3541
- uses: actions/checkout@v3
3642
with:
3743
fetch-depth: 0 # Fetch all history
38-
# Use ref input if provided (manual trigger), otherwise GIT_SHA (backward compat), otherwise github.ref (push trigger)
39-
ref: ${{ inputs.ref || inputs.GIT_SHA || github.ref }}
44+
# For PRs, checkout the PR branch; for manual triggers use provided ref; otherwise use github.ref
45+
ref: ${{ github.event.pull_request.head.sha || inputs.ref || inputs.GIT_SHA || github.ref }}
4046
token: ${{ secrets.GH_PAT }} # Use PAT for checkout
4147

4248
- name: Set up Docker Buildx
@@ -70,6 +76,6 @@ jobs:
7076
echo " PROFILE: $PROFILE"
7177
echo " FEATURES: $FEATURES"
7278
echo " Git SHA: $(git rev-parse HEAD)"
73-
echo " Git Branch/Tag: $(git rev-parse --abbrev-ref HEAD)"
79+
echo " Event: ${{ github.event_name }}"
7480
7581
docker/builder/docker-bake-rust-all.sh

0 commit comments

Comments
 (0)