diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index b6054d5..30b9854 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -5,34 +5,26 @@ on: push: branches: - master - -env: - TEST_IMAGE: "newrelic/nri-statsd:nightly" - DOCKER_IMAGE_TAG: "nightly" + workflow_dispatch: + inputs: + reason: + description: 'Manual Trigger To Test The Workflow' + required: false + type: string jobs: - trivy_scanner: - name: Security scanner for docker image - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Login to DockerHub - uses: docker/login-action@v3 - with: - username: ${{ secrets.OHAI_DOCKER_HUB_ID }} - password: ${{ secrets.OHAI_DOCKER_HUB_PASSWORD }} - - - name: Build image - run: | - make build/docker-amd64 DOCKER_IMAGE_TAG=${{ env.DOCKER_IMAGE_TAG }} - - - name: Run Trivy to check Docker image for vulnerabilities - uses: aquasecurity/trivy-action@master - with: - image-ref: ${{ env.TEST_IMAGE }} - format: 'table' - exit-code: '1' - ignore-unfixed: true - vuln-type: 'os,library' - severity: "CRITICAL,HIGH" + nightly: + uses: newrelic/coreint-automation/.github/workflows/reusable_nightly.yaml@v3 + secrets: + docker_username: ${{ secrets.OHAI_DOCKER_HUB_ID }} + docker_password: ${{ secrets.OHAI_DOCKER_HUB_PASSWORD }} + with: + docker_image: newrelic/nri-statsd + docker_tag: nightly + target_branches: "master" + build_command: | + make build/docker-amd64 DOCKER_IMAGE_TAG=nightly + setup_qemu: false + setup_buildx: false + setup_go: false + trivy_scan: true \ No newline at end of file diff --git a/.github/workflows/push_pr.yaml b/.github/workflows/push_pr.yaml index 8b2a6a5..c2ac43c 100644 --- a/.github/workflows/push_pr.yaml +++ b/.github/workflows/push_pr.yaml @@ -53,4 +53,4 @@ jobs: - name: Running integration tests run: | - make integration-tests-${{ matrix.arch }} \ No newline at end of file + make integration-tests-${{ matrix.arch }}