Skip to content

Commit 2fdfcf0

Browse files
committed
Refactor CI configuration for improved branch handling and added debug information
1 parent 0982a51 commit 2fdfcf0

1 file changed

Lines changed: 14 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ name: multi-stage-react-project-ci/cd
22

33
on:
44
push:
5-
branches: [docker, SSR+Docker]
5+
branches:
6+
- docker
7+
- "SSR+Docker"
68
pull_request:
7-
branches: [docker, SSR+Docker]
9+
branches:
10+
- docker
11+
- "SSR+Docker"
812

913
jobs:
1014
test-and-build:
@@ -49,12 +53,19 @@ jobs:
4953
docker-build:
5054
needs: test-and-build
5155
runs-on: ubuntu-latest
52-
if: github.ref == 'refs/heads/docker' || github.ref == 'refs/heads/SSR+Docker'
56+
if: contains(fromJSON('["refs/heads/docker", "refs/heads/SSR+Docker"]'), github.ref)
5357

5458
steps:
5559
- name: Checkout code
5660
uses: actions/checkout@v4
5761

62+
- name: Debug Branch Info
63+
run: |
64+
echo "Branch ref: ${{ github.ref }}"
65+
echo "Branch name: ${{ github.ref_name }}"
66+
echo "Is SSR+Docker branch: ${{ github.ref == 'refs/heads/SSR+Docker' }}"
67+
echo "Is docker branch: ${{ github.ref == 'refs/heads/docker' }}"
68+
5869
- name: Set up Docker Buildx
5970
uses: docker/setup-buildx-action@v3
6071

0 commit comments

Comments
 (0)