Skip to content

Commit

Permalink
use sha as version label
Browse files Browse the repository at this point in the history
  • Loading branch information
rp-thomas committed Oct 21, 2024
1 parent ef42f22 commit b00be5a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,13 @@ jobs:

deploy-on-kind:
runs-on: ubuntu-latest

needs: build
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: set label
run: |
find . -type f -name "infrastructure/*.yaml" -exec sed -i "s/VERSION_LABEL_DEFAULT/${{ needs.build.meta.outputs.tags }}/g" {} +
- name: Install kind
uses: helm/kind-action@v1
Expand All @@ -121,9 +124,9 @@ jobs:
--path=./clusters/kind-cluster \
--personal
- name: Verify Flux installation
- name: Verify deployment
run: |
flux get kustomizations
kubectl get deployments -n app
./check.sh app hello-go "app\.kubernetes\.io/version" abc123
./check.sh app hello-go "app\.kubernetes\.io/version" ${{ needs.build.meta.outputs.tags }}
kubectl describe deployments -n app hello-go
2 changes: 1 addition & 1 deletion infrastructure/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ labels:
- includeSelectors: false
includeTemplates: false
pairs:
app.kubernetes.io/version: "abc123"
app.kubernetes.io/version: "VERSION_LABEL_DEFAULT"

0 comments on commit b00be5a

Please sign in to comment.