From 2cf0e082e9a158ee35c1dfd02a9df30a3ea8f6af Mon Sep 17 00:00:00 2001 From: Ankit-clouddrove Date: Thu, 8 Feb 2024 00:44:45 +0530 Subject: [PATCH] Modified github-action-nginx.ynl --- .github/workflows/github-action-nginx.yml | 41 ++++++----------------- 1 file changed, 11 insertions(+), 30 deletions(-) diff --git a/.github/workflows/github-action-nginx.yml b/.github/workflows/github-action-nginx.yml index 3087081..f8d5192 100644 --- a/.github/workflows/github-action-nginx.yml +++ b/.github/workflows/github-action-nginx.yml @@ -2,35 +2,13 @@ name: Setup-Nginx on: - pull_request: - types: - - opened - -# - closed -# branches: -# branches: -# - feature1 -# - main -# tags: -# - v1 -jobs: - - job1: - runs-on: ubuntu-latest - # Expose step outputs as job outputs - outputs: - output1: ${{ steps.step1.outputs.test }} - output2: ${{ steps.step2.outputs.test }} - steps: - - id: step1 - run: echo "test=hello" >> "$GITHUB_OUTPUT" - - id: step2 - run: echo "test=world" >> "$GITHUB_OUTPUT" - job2: - runs-on: ubuntu-latest - needs: job1 - steps: - - run: echo ${{needs.job1.outputs.output1}} ${{needs.job1.outputs.output2}} + push + branches: + - master + + pull_request + branches: + - [feature1, prod] @@ -75,12 +53,15 @@ jobs: env: USER_NAME: ${{ secrets.USER_NAME }} USER_PASSWORD: ${{ secrets.USER_PASSWORD }} + needs: [build,test,deploy] steps: - name: Checkout Repository uses: actions/checkout@v2 - name: print name - run: echo "My USER_NAME is ${{env.USER_NAME}}. USER_PASSWORD is ${{env.USER_PASSWORD}}" + run: | + echo "USER_NAME=${USER_NAME}" + echo "USER_PASSWORD=${USER_PASSWORD}" - name: Create and Navigate to Directory run: |