Added Tagging to Release Workflow #13
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
name: Site Build | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
jobs: | |
nextjs-build: | |
name: Next.js Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: npm install | |
- name: Build | |
run: npm run build | |
docker-build: | |
needs: nextjs-build | |
name: Docker Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build Docker Image | |
run: docker build -t ${{ secrets.REGISTRY_HOST }}/srinath-tech:${{ env.PR_NUMBER || 'latest' }} . |