Skip to content

Commit

Permalink
feat(ddos-continuous-deployment.yml): added package generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Llyth committed Mar 13, 2024
1 parent 137a41c commit 240abbf
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/ddos-continous-deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build, Push and Deploy Docker Image

on:
push:
branches:
- master
paths-ignore:
- README.md

jobs:
continuous-deployment:
name: Build, Push and Deploy Docker Image
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}/whatsupdoc
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern=v{{major}}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and Publish image
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

# - name: Setup kubectl
# uses: azure/setup-kubectl@v4.0.0

# - name: Set kubectl context with Service Account
# uses: azure/k8s-set-context@v4.0.0
# with:
# method: service-account
# k8s-url: ${{ secrets.K8S_URL }}
# k8s-secret: ${{ secrets.K8S_SECRET }}

# - name: Rollout restart deployment
# run: kubectl -n whatsupdoc get deployments --no-headers -l app.kubernetes.io/component=backend | awk '{ print $1; }' | xargs kubectl -n whatsupdoc rollout restart deployment

# - name: Rollout status deployment
# run: kubectl -n whatsupdoc get deployments --no-headers -l app.kubernetes.io/component=backend | awk '{ print $1; }' | xargs kubectl -n whatsupdoc rollout status deployment

0 comments on commit 240abbf

Please sign in to comment.