Skip to content

chore(deps): bump github.com/onsi/gomega from 1.32.0 to 1.35.1 #118

chore(deps): bump github.com/onsi/gomega from 1.32.0 to 1.35.1

chore(deps): bump github.com/onsi/gomega from 1.32.0 to 1.35.1 #118

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.worflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Setup Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: "go.mod"
- name: Test
run: make test
- name: Create test Summary
uses: test-summary/action@v2
with:
paths: "report.xml"
if: always()
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: "go.mod"
- name: Lint
run: make lint
env:
LINTER_FLAGS: "--timeout 5m"
build-push:
name: Build & Push
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
needs: [test, lint]
steps:
- name: Checkout Code
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Go
uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2
with:
go-version-file: "go.mod"
- name: Docker Metadata
id: docker-metadata
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
with:
images: |
jmickey/telegraf-sidecar-operator
ghcr.io/jmickey/telegraf-sidecar-operator
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha,format=long
labels: |
org.opencontainers.image.title=Telegraf Sidecar Operator
org.opencontainers.image.description=Use Kubernetes Pod annotations to automatically inject and configure Telegraf sidecar containers.
org.opencontainers.image.authors=Josh Michielsen
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
- name: Build & Publish
id: build-and-push
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
with:
context: .
platforms: linux/arm64,linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker-metadata.outputs.tags }}
labels: ${{ steps.docker-metadata.outputs.labels }}
annotations: ${{ steps.docker-metadata.outputs.annotations }}
build-args: |
BUILD_VERSION=${{ github.ref_name }}
GIT_COMMIT=${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
provenance: false
outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=${{ fromJSON(steps.docker-metadata.outputs.json).labels['org.opencontainers.image.description'] }}
- name: Setup Cosign
if: github.event_name != 'pull_request'
uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3.6.0
- name: Check Cosign install!
if: github.event_name != 'pull_request'
run: cosign version
- name: Sign Image
if: github.event_name != 'pull_request'
env:
# https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-an-intermediate-environment-variable
TAGS: ${{ steps.docker-metadata.outputs.tags }}
DIGEST: ${{ steps.build-and-push.outputs.digest }}
# This step uses the identity token to provision an ephemeral certificate
# against the sigstore community Fulcio instance.
run: echo "${TAGS}" | xargs -I {} make sign-image IMG={}
trivy-scan-pr:
if: github.event_name == 'pull_request'
uses: ./.github/workflows/template-trivy-scan.yaml
with:
runs-on: "ubuntu-latest"
scan-type: "fs"
format: "table"
output: ""
exit-code: 1
publish: false
trivy-codescan:
needs: build-push
if: github.event_name != 'pull_request'
uses: ./.github/workflows/template-trivy-scan.yaml
with:
runs-on: "ubuntu-latest"
scan-type: "fs"
format: "sarif"
exit-code: 0
publish: true
trivy-scan-image:
needs: build-push
if: github.event_name != 'pull_request'
uses: ./.github/workflows/template-trivy-scan.yaml
with:
runs-on: "ubuntu-latest"
scan-type: "image"
format: "sarif"
image-ref: docker.io/jmickey/telegraf-sidecar-operator:main
exit-code: 0
publish: true