Skip to content

feat(app-wide): add service key to env and move create logic to the s… #19

feat(app-wide): add service key to env and move create logic to the s…

feat(app-wide): add service key to env and move create logic to the s… #19

Workflow file for this run

name: Build
on:
push:
branches:
- "main"
workflow_dispatch:
jobs:
build:
runs-on: "ubuntu-22.04"
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ secrets.CONTAINER_USERNAME }}
password: ${{ secrets.CONTAINER_PASSWORD }}
- name: Build and push container image to registry
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ secrets.REPOSITORY_NAME }}/gaming-grids-creator:${{ github.sha }},${{ secrets.REPOSITORY_NAME }}/gaming-grids-creator:latest,
deploy:
needs: [build]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: azure/setup-kubectl@v4
with:
version: "v1.30.1"
id: install
- uses: azure/k8s-set-context@v4
name: Set Context
with:
method: service-account
k8s-url: ${{ secrets.KUBE_DEV_SERVER_URL }}
k8s-secret: ${{ secrets.KUBE_SA_TOKEN_DEV }}
id: setcontext
- name: Apply k8s
uses: Azure/k8s-deploy@v5
with:
name: kubernetes
namespace: gaming-grids
images: ghcr.io/moby-it/gaming-grids-creator:${{ github.sha }}
action: deploy
manifests: |
k8s/app.yaml