diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f7110dd8..af14b36e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,23 +1,24 @@ name: Hprofile Actions -on: workflow_dispatch # [push, workflow_dispatch] -#on: -# pull_request: -# types: -# - closed # Trigger the workflow when a pull request is closed +#on: workflow_dispatch # [push, workflow_dispatch] +on: + pull_request: + types: + - closed # Trigger the workflow when a pull request is closed env: AWS_REGION: us-east-1 jobs: -# If_merged: -# if: false # This condition effectively skips the job -# if: github.event.pull_request.merged == true # Check if the pull request was merged -# runs-on: ubuntu-latest # Specify the runner -# steps: -# - run: | -# echo The PR was merged # Print a message if the pull request was merged + If_merged: + # if: false # This condition effectively skips the job + if: github.event.pull_request.merged == true # Check if the pull request was merged + runs-on: ubuntu-latest # Specify the runner + steps: + - run: | + echo The PR was merged # Print a message if the pull request was merged Testing: + if: false # This condition effectively skips the job # needs: If_merged runs-on: ubuntu-latest steps: @@ -63,7 +64,7 @@ jobs: SONAR_HOST_URL: ${{ secrets.SONAR_URL }} #OPTIONAL BUILD_AND_PUBLISH: - if: false # This condition effectively skips the job +# if: false # This condition effectively skips the job needs: Testing runs-on: ubuntu-latest steps: @@ -86,8 +87,12 @@ jobs: region: ${{ env.AWS_REGION }} tags: ${{ github.run_number }} #latest,${{ github.run_number }} daemon_off: false - dockerfile: ./Dockerfile - context: ./ +# dockerfile: ./Dockerfile +# context: ./ + + run: | + docker build -t $registry:$repo:$tags . + docker push $registry:$repo:$tags - name: Update Image tag run: |