Skip to content

Commit 4c0c0f1

Browse files
committed
real image pushing
1 parent 28024a6 commit 4c0c0f1

File tree

3 files changed

+15
-8
lines changed

3 files changed

+15
-8
lines changed

.github/workflows/build-and-publish.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
- run: docker push ghcr.io/${{ github.repository }}/coilysiren-backend:${{ github.sha }}
2424
deploy:
2525
runs-on: ubuntu-latest
26+
needs: build-publish
2627
steps:
2728
- uses: actions/checkout@v4
2829
- uses: tailscale/github-action@v3
@@ -59,4 +60,4 @@ jobs:
5960
client-certificate-data: ${{ secrets.K8S_CLIENT_CERT_DATA }}
6061
client-key-data: ${{ secrets.K8S_CLIENT_KEY_DATA }}
6162
EOF
62-
- run: kubectl get pods --all-namespaces
63+
- run: make .deploy

Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ DEFAULT_GOAL := help
77
# So only put fast commands up here.
88

99
dns-name ?= $(shell cat config.yml | yq e '.dns-name')
10-
dns-dashed ?= $(subst .,-,$(dns-name))
1110
email ?= $(shell cat config.yml | yq e '.email')
1211
name ?= $(shell cat config.yml | yq e '.name')
1312
name-dashed ?= $(subst /,-,$(name))
14-
hash ?= $(shell git rev-parse HEAD)
13+
git-hash ?= $(shell git rev-parse HEAD)
14+
image-url ?= ghcr.io/$(name)/$(name-dashed):$(git-hash)
15+
16+
echo:
17+
echo $(image-url)
1518

1619
help:
1720
@awk '/^## / \
@@ -80,8 +83,7 @@ deploy-secrets-cert:
8083
env \
8184
NAME=$(name-dashed) \
8285
DNS_NAME=$(dns-name) \
83-
DNS_DASHED=$(dns-dashed) \
84-
EMAIL=$(email) \
86+
IMAGE=$(image-url) \
8587
envsubst < deploy/main.yml | kubectl apply -f -
8688

8789
## deploy the application to the cluster

deploy/main.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,14 @@ spec:
1616
spec:
1717
containers:
1818
- name: ${NAME}
19-
image: nginx # temporary
19+
image: ${IMAGE}
20+
resources:
21+
limits:
22+
cpu: 1000m
23+
memory: 256Mi
2024
env:
21-
# - name: PORT
22-
# value: "80"
25+
- name: PORT
26+
value: "80"
2327
# - name: BSKY_USERNAME
2428
# valueFrom:
2529
# secretKeyRef:

0 commit comments

Comments
 (0)