Skip to content

Commit 1f5b7c8

Browse files
Setting base image based on tag.
1 parent c4eb66b commit 1f5b7c8

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

.github/workflows/cicd.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,19 @@ jobs:
108108
with:
109109
node-version: ${{ env.node_version }}
110110

111-
- if: steps.changes.outputs.src == 'true' || startsWith(github.ref, 'refs/tags/v')
112-
name: Build
111+
- if: steps.changes.outputs.src == 'true' && !startsWith(github.ref, 'refs/tags/v')
112+
name: Build default
113113
working-directory: ${{env.base_dir}}/${{ matrix.container_name }}
114114
run: |
115115
make build IMAGE_NAME=${{ env.registry }}/${{ env.image_prefix }}${{ matrix.container_name }} WORKSPACE_FOLDER=${{ env.workspace_folder }}
116116
117+
- if: startsWith(github.ref, 'refs/tags/v')
118+
name: Build lock base image tags to same version
119+
working-directory: ${{env.base_dir}}/${{ matrix.container_name }}
120+
run: |
121+
make build BASE_IMAGE_TAG=${${{ github.ref_name }}#v} IMAGE_NAME=${{ env.registry }}/${{ env.image_prefix }}${{ matrix.container_name }} WORKSPACE_FOLDER=${{ env.workspace_folder }}
122+
123+
117124
- if: steps.changes.outputs.src == 'true' || startsWith(github.ref, 'refs/tags/v')
118125
name: Extract metadata (tags, labels) for Docker
119126
id: meta
@@ -123,7 +130,6 @@ jobs:
123130
flavor: |
124131
latest=auto
125132
tags: |
126-
type=raw,value=latest,enable={{is_default_branch}}
127133
type=schedule
128134
type=semver,pattern={{version}}
129135
type=semver,pattern={{major}}.{{minor}}

src/devcontainers/default/.devcontainer/devcontainer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
},
2323
"ghcr.io/devcontainers-extra/features/zsh-plugins:0.0.5": {
2424
"omzPlugins": "https://github.com/zsh-users/zsh-autosuggestions https://github.com/zsh-users/zsh-syntax-highlighting.git https://github.com/MichaelAquilina/zsh-you-should-use.git",
25-
"plugins": "git ssh-agent sudo terraform dirhistory docker asdf aws emoji you-should-use zsh-autosuggestions zsh-syntax-highlighting"
25+
"plugins": "git ssh-agent gpg-agent python ubuntu ruby jsontools sudo bundler direnv gitignore encode64 gem copypath copyfile terraform dirhistory aliases z docker asdf aws emoji zsh-you-should-use zsh-autosuggestions zsh-syntax-highlighting"
26+
27+
2628
},
2729
"ghcr.io/devcontainers/features/aws-cli:1.1.2": {
2830
"version": "2.31.18"

0 commit comments

Comments
 (0)