Skip to content

Commit

Permalink
github action
Browse files Browse the repository at this point in the history
  • Loading branch information
mosazhaw committed Nov 27, 2024
1 parent d86cb56 commit 11c1a55
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: docker hub push

on:
workflow_dispatch:
push:
branches:
- 'deploy'

jobs:
docker:
runs-on: ubuntu-latest
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: mosazhaw/devopsazure:latest

deploy:
permissions:
contents: none
runs-on: ubuntu-latest
needs: docker

steps:
- name: Deploy to Azure Web App
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
images: 'mosazhaw/devopsazure:latest'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/node_modules
/.azure

0 comments on commit 11c1a55

Please sign in to comment.