Skip to content

Commit a2e30da

Browse files
adding check for if its a v tag.
1 parent 713d5b4 commit a2e30da

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

.github/workflows/cicd.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
packages: write
4343
contents: write
4444
pull-requests: write
45+
4546
steps:
4647
- uses: actions/checkout@v3
4748
- uses: dorny/paths-filter@v3
@@ -81,12 +82,13 @@ jobs:
8182
- '${{ env.workflow_path }}'
8283
8384
build-and-push-image:
84-
if: ${{ needs.check-if-changed.outputs.src == 'true' }}
85+
if: ${{ needs.check-if-changed.outputs.src == 'true' || startsWith(github.ref, 'refs/tags/v') }}
8586
needs: check-if-changed
8687
runs-on: ubuntu-latest
8788
strategy:
8889
fail-fast: false
8990
max-parallel: 1
91+
9092
matrix:
9193
include:
9294
- container_name: base
@@ -104,7 +106,7 @@ jobs:
104106
packages: write
105107
attestations: write
106108
id-token: write
107-
#
109+
108110
steps:
109111
- name: Checkout repository
110112
uses: actions/checkout@v5
@@ -120,7 +122,7 @@ jobs:
120122
with:
121123
node-version: ${{ env.node_version }}
122124

123-
- if: ${{(!startsWith(github.ref, 'refs/tags/v'))}}
125+
- if: ${{!startsWith(github.ref, 'refs/tags/v')}}
124126
name: Build default
125127
working-directory: ${{env.base_dir}}/${{ matrix.container_name }}
126128
run: |
@@ -133,8 +135,7 @@ jobs:
133135
run: |
134136
TAG=${{ github.ref_name }}
135137
TAG_VERSION=${TAG#v}
136-
make build BASE_IMAGE_TAG=$TAG_VERSION IMAGE_NAME=${{ env.registry }}/${{ env.image_prefix }}${{ matrix.container_name }} WORKSPACE_FOLDER=${{ env.workspace_folder }}
137-
138+
make build BASE_IMAGE_TAG=$TAG_VERSION IMAGE_NAME=${{ env.registry }}/${{ env.image_prefix }}${{ matrix.container_name }} WORKSPACE_FOLDER=${{ env.workspace_folder }}
138139
139140
- name: Extract metadata (tags, labels) for Docker
140141
id: meta
@@ -177,4 +178,3 @@ jobs:
177178
subject-name: ${{ env.registry }}/${{ env.image_prefix }}${{ matrix.container_name }}
178179
subject-digest: ${{ steps.push.outputs.digest }}
179180
push-to-registry: false
180-

0 commit comments

Comments
 (0)