Skip to content

Commit fe466e2

Browse files
committed
chore(ci): set environment variables directly
1 parent 6c5771b commit fe466e2

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

.github/workflows/docker-build.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ jobs:
4242
python-version: "3.12"
4343

4444
- name: Extract branch name
45-
id: extract-branch
4645
env:
4746
BRANCH_NAME_INPUT: ${{ github.event.inputs.branch_name }}
4847
run: |
@@ -52,7 +51,8 @@ jobs:
5251
BRANCH_NAME="${GITHUB_REF##*/}"
5352
fi
5453
echo "GITHUB_REF='${GITHUB_REF}'"
55-
echo "branch=${BRANCH_NAME}" >> "$GITHUB_OUTPUT"
54+
echo "BRANCH_NAME='${BRANCH_NAME}'"
55+
echo "BRANCH_NAME=${BRANCH_NAME}" >> "$GITHUB_ENV"
5656
5757
- name: Login to Docker Hub
5858
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
@@ -74,8 +74,6 @@ jobs:
7474
PLATFORMS: ${{ steps.buildx.outputs.platforms }}
7575

7676
- name: Build and test and push docker images
77-
env:
78-
BRANCH_NAME: ${{ steps.extract-branch.outputs.branch }}
7977
run: |
8078
build_helpers/publish_docker_multi.sh
8179
@@ -94,7 +92,6 @@ jobs:
9492
persist-credentials: false
9593

9694
- name: Extract branch name
97-
id: extract-branch
9895
env:
9996
BRANCH_NAME_INPUT: ${{ github.event.inputs.branch_name }}
10097
run: |
@@ -104,7 +101,8 @@ jobs:
104101
BRANCH_NAME="${GITHUB_REF##*/}"
105102
fi
106103
echo "GITHUB_REF='${GITHUB_REF}'"
107-
echo "branch=${BRANCH_NAME}" >> "$GITHUB_OUTPUT"
104+
echo "BRANCH_NAME='${BRANCH_NAME}'"
105+
echo "BRANCH_NAME=${BRANCH_NAME}" >> "$GITHUB_ENV"
108106
109107
- name: Login to Docker Hub
110108
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3.5.0
@@ -114,7 +112,6 @@ jobs:
114112

115113
- name: Build and test and push docker images
116114
env:
117-
BRANCH_NAME: ${{ steps.extract-branch.outputs.branch }}
118115
GHCR_USERNAME: ${{ github.actor }}
119116
GHCR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
120117
run: |

0 commit comments

Comments
 (0)