Skip to content

chore: updated github actions permissions #848

chore: updated github actions permissions

chore: updated github actions permissions #848

Workflow file for this run

name: eBay UI CI
on:
pull_request:
types: [opened, synchronize]
push:
branches: [master]
permissions: read-all
concurrency:
group: "${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: "16.x"
- uses: webfactory/ssh-agent@v0.5.4
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- run: npm i
- run: npm run build:ci
env:
BROWSERSTACK_USER: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
BROWSERSTACK_PROJECT_NAME: "CoreUI"
BUILD_NUMBER: CI
REPO_SLUG: ebay/ebayui-core
- uses: coverallsapp/github-action@master
if: ${{ success() }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: .coverage/lcov.info
release:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
needs: [build]
if: "${{ github.repository_owner == 'ebay' && github.event_name == 'push' }}"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: "16.x"
cache: npm
- name: Install dependencies
run: npm ci
- name: Release
id: changesets
uses: changesets/action@v1
with:
version: npm run version
publish: npm run release
commit: "[ci] release"
title: "[ci] release"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}