Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Populate CODEOWENRS, baseline package.json and baseline cortex.yaml #195

Populate CODEOWENRS, baseline package.json and baseline cortex.yaml

Populate CODEOWENRS, baseline package.json and baseline cortex.yaml #195

Workflow file for this run

name: build
on:
push:
branches:
- main
tags:
- 'v*.*.*'
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- id: setup-node
name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Check out code repository source code
uses: actions/checkout@v2
- name: Install dependencies
run: yarn
- name: Run tests
run: yarn test:ci
- name: Run build
run: yarn build
# Publishing is done in a separate job to allow
# for all matrix builds to complete.
release-npm:
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
strategy:
fail-fast: false
matrix:
node: [14]
steps:
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Check out repo
uses: actions/checkout@v2
with:
fetch-depth: 2
# Fetch tags and describe the commit before the merge commit
# to see if it's a version publish
- name: Fetch tags
run: |
git fetch --tags
if git describe --exact-match --match "v*.*.*" HEAD^2
then
echo "Found version commit tag. Publishing."
echo "publish=true" >> $GITHUB_ENV
else
echo "Version commit tag not found. Not publishing."
fi
- name: Publish
if: env.publish == 'true'
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > .npmrc
yarn
npm publish
publish-image:
if: ${{github.event_name != 'pull_request'}}
uses: jupiterone/.github/.github/workflows/publish_integration_docker_image.yaml@v1.0.0
with:
package-name: 'jupiterone/graph-kubernetes'
secrets:
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}