Delete catalog-info.yaml #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: kubernetes-demo-app | |
on: | |
push: | |
pull_request: | |
branches: [ main, development ] | |
workflow_dispatch: | |
jobs: | |
build-and-push: | |
runs-on: ubuntu-latest | |
env: | |
DOCKER_IMAGE: valonjanuzaj/kubernetes-demo:${{ github.sha }} | |
steps: | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v3 | |
with: | |
push: true | |
tags: ${{ env.DOCKER_IMAGE }} | |
- name: Checkout manifest repo | |
uses: actions/checkout@v2 | |
with: | |
repository: vjanz/kubernetes-demo-gitops | |
token: ${{ secrets.GH_PAT }} | |
ref: main | |
- name: Update dev manifest | |
if: ${{ github.event_name == 'push' && | |
contains(' | |
refs/heads/development | |
', github.ref)}} | |
env: | |
K8S_YAML_DIR: ./apps/fastapi-service | |
IMAGE_NAME: ${{ env.DOCKER_IMAGE }} | |
run: | | |
ls -la | |
cd $K8S_YAML_DIR/overlays/development | |
curl -s -o kustomize --location https://github.com/kubernetes-sigs/kustomize/releases/download/v3.1.0/kustomize_3.1.0_linux_amd64 | |
chmod u+x ./kustomize | |
./kustomize edit set image example-image=$IMAGE_NAME | |
- name: Push the changes to git | |
run: | | |
git config user.name github-actions | |
git config user.email github-actions@github.com | |
git add . | |
git commit -m "Update image version" | |
git push |