Skip to content

Adding spectro-metrics-pack #198

Adding spectro-metrics-pack

Adding spectro-metrics-pack #198

Workflow file for this run

name: Packs Validation
# # Controls when the action will run. Workflow runs when manually triggered using the UI
# # or API.
on:
pull_request:
branches: [ main ]
# # A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# # This workflow contains a single job called "validator"
validator:
# # The type of runner that the job will run on
runs-on: ubuntu-latest
# # Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install -y nodejs npm
sudo npm install -g validate-json
sudo wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq
sudo chmod +x /usr/bin/yq
VERSION=$(curl -s "https://api.github.com/repos/google/go-containerregistry/releases/latest" | jq -r '.tag_name')
curl -sL "https://github.com/google/go-containerregistry/releases/download/${VERSION}/go-containerregistry_$(uname -a | awk '{print $1}')_$(arch).tar.gz" > go-containerregistry.tar.gz
sudo tar -zxvf go-containerregistry.tar.gz -C /usr/local/bin/ crane
# # Checkout code
- name: Checkout branch
uses: actions/checkout@v3
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
# # Run Validations
- name: Check Packs
shell: bash
run: |
echo "${{ steps.changed-files.outputs.all_changed_files }}" >> /tmp/modified_files
chmod +x ${GITHUB_WORKSPACE}/validator/validate-packs.sh
cd ${GITHUB_WORKSPACE}/validator
./validate-packs.sh