Tempo version bump to 2.2.1 #87
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "deployment/**" | |
- ".github/**" | |
pull_request: | |
branches: | |
- main | |
paths: | |
- "deployment/**" | |
- ".github/**" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Run Trivy vulnerability scanner | |
uses: aquasecurity/trivy-action@master | |
with: | |
scan-type: 'config' | |
scan-ref: '.' | |
format: 'sarif' | |
output: 'trivy-results.sarif' | |
- name: Upload Trivy scan results to GitHub Security tab | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: 'trivy-results.sarif' | |
k8s-test: | |
runs-on: ubuntu-latest | |
needs: [build] | |
if: ${{ github.event_name == 'pull_request' }} | |
steps: | |
- name: Create k8s Kind Cluster | |
uses: helm/[email protected] | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
- name: Run K8s test | |
run: | | |
kubectl cluster-info | |
export NS=`cat deployment/kustomization.yml | grep namespace | awk '{ print $2 }'` | |
if [ -z "$NS" ]; then | |
export NS='monitoring' | |
fi | |
kubectl create namespace $NS | |
kubectl kustomize deployment/ | kubectl apply -n $NS -f - | |
kubectl get all -n $NS | |
auto-approve: | |
runs-on: ubuntu-latest | |
needs: [build, k8s-test] | |
if: ${{ github.event_name == 'pull_request' }} | |
steps: | |
- name: Auto Approve PR | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ github.token }} | |
script: | | |
github.rest.pulls.createReview({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
pull_number: context.issue.number, | |
event: "APPROVE" | |
}) | |
# auto-merge: | |
# runs-on: ubuntu-latest | |
# needs: [auto-approve] | |
# if: ${{ github.event_name == 'pull_request' }} | |
# env: | |
# PR_NUMBER: ${{ github.event.number }} | |
# steps: | |
# - name: Check out repository code | |
# uses: actions/checkout@v3 | |
# - name: Auto Merge PR | |
# uses: actions/github-script@v6 | |
# with: | |
# github-token: ${{ github.token }} | |
# script: | | |
# await github.rest.pulls.merge({ | |
# merge_method: 'squash', | |
# owner: context.repo.owner, | |
# pull_number: process.env.PR_NUMBER, | |
# repo: context.repo.repo | |
# }); |