Skip to content

Commit 51a9620

Browse files
authored
Changed to python and fix helm problem
1 parent 23d3a8b commit 51a9620

File tree

12 files changed

+310
-4269
lines changed

12 files changed

+310
-4269
lines changed

.github/workflows/docker.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
uses: docker/login-action@v3
2727
with:
2828
registry: ghcr.io
29-
username: ${{ github.actor }}
29+
username: ${{ github.repository_owner }}
3030
password: ${{ secrets.GITHUB_TOKEN }}
3131

3232
- name: Build and push Docker image
@@ -94,10 +94,19 @@ jobs:
9494
run: |
9595
sed -i "s|repository: .*|repository: docker.io/${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }}|g" ./helm/values.yaml
9696
sed -i "s|tag: .*|tag: ${{ github.sha }}|g" ./helm/values.yaml
97-
- name: Commit updated image tag
97+
98+
- name: Push Helm chart to separate repo
9899
run: |
99-
git config --local user.email "[email protected]"
100-
git config --local user.name "GitHub Action"
101-
git add helm/values.yaml
102-
git commit -m "Update image tag to ${{ github.sha }}" || exit 0
103-
git push https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
100+
git clone https://${{ github.repository_owner }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository_owner }}/helm.git helm-repo
101+
cd helm-repo
102+
103+
# Copy updated helm folder into this repo
104+
rm -rf *
105+
cp -r ../helm/* .
106+
107+
# Commit and push changes
108+
git config user.email "[email protected]"
109+
git config user.name "GitHub Action"
110+
git add .
111+
git commit -m "Update helm chart with image ${{ github.sha }}" || echo "No changes to commit"
112+
git push origin main

Dockerfile

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
1-
FROM node:18-alpine3.17
2-
1+
FROM python:3.11-alpine3.17
32
WORKDIR /usr/app
4-
5-
COPY package*.json /usr/app/
6-
7-
RUN npm install
8-
3+
COPY requirements.txt /usr/app/
4+
RUN pip install -r requirements.txt
95
COPY . .
10-
116
EXPOSE 3000
12-
13-
CMD [ "npm", "start" ]
7+
CMD [ "python", "app.py" ]

app-controller.js

Lines changed: 0 additions & 67 deletions
This file was deleted.

app-test.js

Lines changed: 0 additions & 190 deletions
This file was deleted.

0 commit comments

Comments
 (0)