Skip to content

Commit 7569f68

Browse files
committed
Add folder support to workingDir
1 parent 66f3e8e commit 7569f68

2 files changed

Lines changed: 21 additions & 29 deletions

File tree

.diploi/helm/app.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ spec:
4242
args:
4343
- |
4444
uv sync --frozen --no-cache --link-mode=copy && \
45-
cp --remove-destination "$(readlink /app/{{ .Values.identifier }}/.venv/bin/python)" /app/{{ .Values.identifier }}/.venv/bin/python 2>/dev/null || :
46-
workingDir: /app/{{ .Values.identifier }}
45+
cp --remove-destination "$(readlink /app{{ .Values.folder }}/.venv/bin/python)" /app{{ .Values.folder }}/.venv/bin/python 2>/dev/null || :
46+
workingDir: /app{{ .Values.folder }}
4747
volumeMounts:
4848
- name: app-mount
4949
mountPath: /app
@@ -55,7 +55,7 @@ spec:
5555
ports:
5656
- containerPort: 8000
5757
{{- if eq .Values.stage "development" }}
58-
workingDir: /app/{{ .Values.identifier }}
58+
workingDir: /app{{ .Values.folder }}
5959
{{- end }}
6060
env:
6161
{{- range .Values.env }}

.github/workflows/Prebuild.yaml

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ env:
88

99
jobs:
1010
production:
11-
name: 'Production'
11+
name: "Production"
1212
runs-on: ubuntu-24.04-arm
1313
permissions:
1414
packages: write
@@ -24,34 +24,30 @@ jobs:
2424
uses: docker/metadata-action@v4
2525
with:
2626
images: ${{ env.REGISTRY }}/${{ github.repository }}
27+
tags: |
28+
type=ref,event=branch
29+
type=ref,event=tag
30+
# Set latest tag for default branch
31+
type=raw,value=latest,enable={{is_default_branch}}
2732
28-
- name: 'Login to GitHub Container Registry'
33+
- name: "Login to GitHub Container Registry"
2934
uses: docker/login-action@v3
3035
with:
3136
registry: ${{ env.REGISTRY }}
3237
username: ${{ github.actor }}
3338
password: ${{ secrets.GITHUB_TOKEN }}
3439

35-
- name: Set tags
36-
id: set-tags
37-
run: |
38-
TAGS="${{ steps.meta.outputs.tags }}"
39-
if [[ "${GITHUB_REF}" == "refs/heads/main" ]]; then
40-
TAGS="${TAGS},${{ env.REGISTRY }}/${{ github.repository }}:latest"
41-
fi
42-
echo "tags=$TAGS" >> $GITHUB_ENV
43-
4440
- name: Build and push
4541
uses: docker/build-push-action@v6
4642
with:
4743
push: ${{ github.event_name != 'pull_request' }}
4844
platforms: linux/arm64
49-
tags: ${{ env.tags }}
45+
tags: ${{ steps.meta.outputs.tags }}
5046
labels: ${{ steps.meta.outputs.labels }}
5147

5248
development:
53-
name: 'Development'
54-
runs-on: ubuntu-24.04-arm
49+
name: "Development"
50+
runs-on: ubuntu-latest
5551
permissions:
5652
packages: write
5753
steps:
@@ -66,30 +62,26 @@ jobs:
6662
uses: docker/metadata-action@v4
6763
with:
6864
images: ${{ env.REGISTRY }}/${{ github.repository }}
65+
tags: |
66+
type=ref,event=branch
67+
type=ref,event=tag
68+
# Set latest tag for default branch
69+
type=raw,value=latest,enable={{is_default_branch}}
6970
flavor: |
70-
suffix=-dev.
71+
suffix=-dev.,onlatest=true
7172
72-
- name: 'Login to GitHub Container Registry'
73+
- name: "Login to GitHub Container Registry"
7374
uses: docker/login-action@v3
7475
with:
7576
registry: ${{ env.REGISTRY }}
7677
username: ${{ github.actor }}
7778
password: ${{ secrets.GITHUB_TOKEN }}
7879

79-
- name: Set tags
80-
id: set-tags
81-
run: |
82-
TAGS="${{ steps.meta.outputs.tags }}"
83-
if [[ "${GITHUB_REF}" == "refs/heads/main" ]]; then
84-
TAGS="${TAGS},${{ env.REGISTRY }}/${{ github.repository }}:latest"
85-
fi
86-
echo "tags=$TAGS" >> $GITHUB_ENV
87-
8880
- name: Build and push
8981
uses: docker/build-push-action@v6
9082
with:
9183
file: Dockerfile.dev
9284
push: ${{ github.event_name != 'pull_request' }}
9385
platforms: linux/arm64
94-
tags: ${{ env.tags }}
86+
tags: ${{ steps.meta.outputs.tags }}
9587
labels: ${{ steps.meta.outputs.labels }}

0 commit comments

Comments
 (0)