From b16ee181ad63082f0b551e03c13bfcec6adab34d Mon Sep 17 00:00:00 2001 From: DS Date: Thu, 1 Feb 2024 16:12:12 +0530 Subject: [PATCH] Write a workflow --- .github/workflows/worker1.yml | 37 +++++++++++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/worker1.yml diff --git a/.github/workflows/worker1.yml b/.github/workflows/worker1.yml new file mode 100644 index 0000000..b2fd816 --- /dev/null +++ b/.github/workflows/worker1.yml @@ -0,0 +1,37 @@ +name: BLOG'S WORKFLOW +run-name: Actions number ${{github.run_number}} + +on: + push: + branches: + - "main" + +jobs: + build_next_app: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./ + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v4 + + # - name: Login to docker hub + # uses: docker/login-action@v3 + # with: + # username: ${{secrets.DOCKER_USERNAME}} + # password: ${{secrets.DOCKER_PWD}} + + # - name: Set up Docker Buildx + # uses: docker/setup-buildx-action@v3 + + # - name: Push to Docker Hub + # uses : docker/build-push-action@v5 + + - name: Test and Build an application + run: | + npm run build + npm run lint diff --git a/package.json b/package.json index f687881..b0a0245 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "dev": "next dev", "build": "next build", "start": "next start", - "lint": "next lint" + "lint": "next lint && echo 'DONE🎊'" }, "dependencies": { "next": "14.1.0",