Skip to content

Fix error in build command #2

Fix error in build command

Fix error in build command #2

name: Build and deploy application
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Login to container registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Setup node.js
uses: actions/setup-node@v2
with:
node-version: '14.15.3'
- name: Install dependencies
run: npm install
- name: Build application
run: npm run build
- name: Install pack CLI
uses: buildpacks/github-actions/[email protected]
- name: Build image
run: pack build ${{ secrets.REGISTRY }}/${{ github.repository }}:latest --builder paketobuildpacks/builder-jammy-base:latest --buildpack gcr.io/paketo-buildpacks/nginx --env BP_WEB_SERVER=nginx
- name: Push image to registry
run: docker push ${{ secrets.REGISTRY }}/${{ github.repository }}:latest