Skip to content

fix(ci): adds correct repository path #160

fix(ci): adds correct repository path

fix(ci): adds correct repository path #160

Workflow file for this run

name: "Deploy"
on:
push:
branches: ["main"]
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_URL: ghcr.io/${{ github.repository }}:${{ github.sha }}
permissions:
id-token: write
contents: read
actions: read
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Install dependencies
run: bun i --frozen-lockfile
- name: Populate latest workflows
run: bun run populate-workflows
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.IMAGE_URL }}
labels: |
dockerfile-path=https://github.com/${{ github.repository }}/blob/${{ github.sha }}/Dockerfile
- name: Build image and push to registry
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
platforms: linux/arm64
push: true
tags: ${{ env.IMAGE_URL }}
labels: ${{ steps.meta.outputs.labels }}
- name: Join our Tailnet
uses: tailscale/github-action@v2
with:
oauth-client-id: ${{ secrets.TAILSCALE_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TAILSCALE_OAUTH_SECRET }}
tags: ${{ secrets.TAILSCALE_TAGS }}
version: 1.64.0
- name: Set the Kubernetes context
uses: azure/k8s-set-context@v4
with:
method: service-account
k8s-url: ${{ secrets.KUBERNETES_URL }}
k8s-secret: ${{ secrets.KUBERNETES_SECRET }}
- name: Deploy to the Kubernetes cluster
uses: azure/k8s-deploy@v5
with:
namespace: getactions
manifests: |
kubernetes/deployment.yaml
kubernetes/ingress.yaml
kubernetes/scaling.yaml
kubernetes/service-account.yaml
kubernetes/service.yaml
images: |
${{ env.IMAGE_URL }}