Skip to content

Commit 63969fb

Browse files
committed
build image with branch as tag on none default branch
1 parent 68c69c6 commit 63969fb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/image.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Check out the repo
1717
uses: actions/checkout@v4
1818
- name: simple render
19-
run: PATH="${GITHUB_WORKSPACE}:$PATH" bash render-pcb.sh -f "${GITHUB_WORKSPACE}/.github/tests/test pcb/test.kicad_pcb" && test -s "${GITHUB_WORKSPACE}/.github/tests/test pcb/test_top.png"
19+
run: PATH="${GITHUB_WORKSPACE}:$PATH" bash render-pcb.sh -f "${GITHUB_WORKSPACE}/.github/tests/test pcb/test.kicad_pcb" && test -s "${GITHUB_WORKSPACE}/.github/tests/test pcb/test_top.png"
2020
- name: simple render with output path
2121
run: PATH="${GITHUB_WORKSPACE}:$PATH" bash render-pcb.sh -f "${GITHUB_WORKSPACE}/.github/tests/test pcb/test.kicad_pcb" -o "${GITHUB_WORKSPACE}/images" && test -s "${GITHUB_WORKSPACE}/images/top.png"
2222
- name: simple render with zoom
@@ -48,15 +48,15 @@ jobs:
4848
id: date
4949
run: echo "date=$(date +'%Y-%m-%d-%H-%M')" >> $GITHUB_OUTPUT
5050
- name: Build and push Docker image dev
51-
if: github.ref_name == 'dev'
51+
if: github.ref_name != github.event.repository.default_branch
5252
uses: docker/build-push-action@v5
5353
with:
5454
context: .
5555
file: ./Dockerfile
5656
push: true
5757
build-args: |
5858
"VERSION=${{ github.sha }}-dev"
59-
tags: "ghcr.io/linalinn/kicad-render:dev,ghcr.io/linalinn/kicad-render:dev-${{ steps.date.outputs.date }}"
59+
tags: "ghcr.io/linalinn/kicad-render:dev,ghcr.io/linalinn/kicad-render:${{ github.event.repository.default_branch }}"
6060

6161
- name: Build and push Docker image
6262
if: github.ref_name == github.event.repository.default_branch

0 commit comments

Comments
 (0)