Skip to content

Commit

Permalink
Nr 341878 use reusable workflow for docker image security checks (#509)
Browse files Browse the repository at this point in the history
* running nightly on push_pr to test workflow

* re triggering pr actions

* re triggering pr actions

* added fetch depth

* Trigger Actions

* Added integration_name

* points to the correct workflow

* removed pull request trigger used for testing

* Removed multiline
  • Loading branch information
rahulreddy15 authored Dec 13, 2024
1 parent 8b18abb commit a26cdff
Showing 1 changed file with 18 additions and 31 deletions.
49 changes: 18 additions & 31 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Nightly build

on:
schedule:
- cron: "0 3 * * *"
Expand All @@ -8,38 +7,26 @@ on:
- main

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
INTEGRATION: "prometheus"
ORIGINAL_REPO_NAME: 'newrelic/nri-prometheus'
REPO_FULL_NAME: ${{ github.event.repository.full_name }}
TAG: nightly
TAG_SUFFIX: "-nightly" # In order to avoid nightly updating images
TAG_SUFFIX: "-nightly"

jobs:
release:
name: Build and release nightlies with goreleaser
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.FSI_DOCKERHUB_USERNAME }}
password: ${{ secrets.FSI_DOCKERHUB_TOKEN }}
- name: Do the release
# The release target is not being executed inside a container (ci/release) since the target
# compiles docker images (from goreleaser) and that cannot be done inside a container.
run: make release
env:
GENERATE_PACKAGES: true
nightly:
uses: newrelic/coreint-automation/.github/workflows/reusable_nightly.yaml@v3
secrets:
docker_username: ${{ secrets.FSI_DOCKERHUB_USERNAME }}
docker_password: ${{ secrets.FSI_DOCKERHUB_TOKEN }}
with:
docker_image: newrelic/nri-prometheus
docker_tag: nightly
target_branches: "main"
integration_name: "prometheus"
build_command: make release
setup_qemu: true
setup_buildx: true
setup_go: true
go_version_file: 'go.mod'
trivy_scan: false
generate_packages: true

0 comments on commit a26cdff

Please sign in to comment.