-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ddos-continuous-deployment.yml): added package generation
- Loading branch information
Showing
1 changed file
with
60 additions
and
0 deletions.
There are no files selected for viewing
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
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 |