Skip to content

Commit 6b0cc7f

Browse files
authored
ci(merge-queue): Don't re-run checks on master (#4864)
This might not work for all commits that are added not through the merge queue, but that would only be a new release, in which the pipeline should have already ran within the release branch. #skip-changelog
1 parent 0c03c13 commit 6b0cc7f

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: CI
33
on:
44
push:
55
branches:
6-
- master
76
- release/**
87
- release-library/**
98

@@ -19,6 +18,7 @@ concurrency:
1918
env:
2019
CARGO_TERM_COLOR: always
2120
RELAY_CARGO_ARGS: "--locked"
21+
IS_MASTER: "${{ github.event_name == 'merge_group' }}"
2222

2323
jobs:
2424
lint:
@@ -40,7 +40,7 @@ jobs:
4040
submodules: recursive
4141

4242
- name: Setup SSH agent
43-
if: ${{ env.SSH_PRIVATE_KEY != '' }}
43+
if: env.SSH_PRIVATE_KEY != ''
4444
uses: webfactory/ssh-agent@v0.9.0
4545
with:
4646
ssh-private-key: ${{ env.SSH_PRIVATE_KEY }}
@@ -130,7 +130,7 @@ jobs:
130130
submodules: recursive
131131

132132
- name: Setup SSH agent
133-
if: ${{ env.SSH_PRIVATE_KEY != '' }}
133+
if: env.SSH_PRIVATE_KEY != ''
134134
# Windows needs an older versino of the ssh agent: https://github.com/webfactory/ssh-agent/pull/17
135135
uses: webfactory/ssh-agent@v0.7.0
136136
with:
@@ -184,7 +184,7 @@ jobs:
184184
submodules: recursive
185185

186186
- name: Setup SSH agent
187-
if: ${{ env.SSH_PRIVATE_KEY != '' }}
187+
if: env.SSH_PRIVATE_KEY != ''
188188
uses: webfactory/ssh-agent@v0.9.0
189189
with:
190190
ssh-private-key: ${{ env.SSH_PRIVATE_KEY }}
@@ -473,7 +473,7 @@ jobs:
473473
docker buildx build \
474474
--platform "${PLATFORMS}" \
475475
--tag "${DOCKER_IMAGE}:${REVISION}" \
476-
$( [[ "${GITHUB_REF}" == "refs/heads/master" ]] && printf %s "--tag ${DOCKER_IMAGE}:nightly" ) \
476+
$( [[ "${IS_MASTER}" == "true" ]] && printf %s "--tag ${DOCKER_IMAGE}:nightly" ) \
477477
--file Dockerfile.release \
478478
--push \
479479
.
@@ -557,7 +557,7 @@ jobs:
557557
docker buildx build \
558558
--platform "${PLATFORMS}" \
559559
--tag "${AR_DOCKER_IMAGE}:${REVISION}" \
560-
$( [[ "${GITHUB_REF}" == "refs/heads/master" ]] && printf %s "--tag ${AR_DOCKER_IMAGE}:latest" ) \
560+
$( [[ "${IS_MASTER}" == "true" ]] && printf %s "--tag ${AR_DOCKER_IMAGE}:latest" ) \
561561
--file Dockerfile.release \
562562
--push \
563563
.
@@ -572,7 +572,7 @@ jobs:
572572
matrix:
573573
image_name: ["relay"] # Don't publish relay-pop (for now)
574574

575-
if: ${{ (github.ref_name == 'master') }}
575+
if: github.event_name == 'merge_group'
576576

577577
env:
578578
GHCR_DOCKER_IMAGE: "ghcr.io/getsentry/${{ matrix.image_name }}"
@@ -644,7 +644,7 @@ jobs:
644644
run: docker buildx imagetools create --tag "${AR_DOCKER_IMAGE}:${REVISION}" "${GHCR_DOCKER_IMAGE}:${REVISION}"
645645

646646
- name: Copy Nightly from GHCR to AR
647-
if: github.ref == 'refs/heads/master'
647+
if: env.IS_MASTER == 'true'
648648
run: docker buildx imagetools create --tag "${AR_DOCKER_IMAGE}:nightly" "${GHCR_DOCKER_IMAGE}:nightly"
649649

650650
gocd-artifacts:
@@ -772,7 +772,7 @@ jobs:
772772
key: ${{ github.job }}
773773

774774
- name: Setup SSH agent
775-
if: ${{ env.SSH_PRIVATE_KEY != '' }}
775+
if: env.SSH_PRIVATE_KEY != ''
776776
uses: webfactory/ssh-agent@v0.9.0
777777
with:
778778
ssh-private-key: ${{ env.SSH_PRIVATE_KEY }}
@@ -861,7 +861,7 @@ jobs:
861861
validate-devservices-config:
862862
runs-on: ubuntu-24.04
863863
needs: devservices-files-changed
864-
if: ${{ needs.devservices-files-changed.outputs.devservices-files-changed == 'true' }}
864+
if: needs.devservices-files-changed.outputs.devservices-files-changed == 'true'
865865
steps:
866866
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
867867
name: Checkout repository

0 commit comments

Comments
 (0)