Skip to content

Commit

Permalink
feat: add setup action for use in GitHub workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kosmoz committed Mar 1, 2024
1 parent 0e29a94 commit bb0953b
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Test actions/setup

on:
push:
paths:
- actions/**

jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: read
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- name: Setup scout
uses: ./actions/setup
with:
token: ${{ secrets.GITHUB_TOKEN }}
- run: scout --version
9 changes: 9 additions & 0 deletions actions/setup/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Scout Setup Action

This is a GitHub Workflow Action to setup @glasskube/scout.

## Inputs

- `token` (required): The GitHub Token used to authenticate against the GitHub package registry.
You can use ${{ secrets.GITHUB_TOKEN }} or a custom personal access token.
It does not need any special permissions.
21 changes: 21 additions & 0 deletions actions/setup/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Setup @glasskube/scout
description: Install @glasskube/scout globally using npm
inputs:
token:
required: true
description: GitHub Token for NPM registry
outputs: {}
runs:
using: "composite"
steps:
- name: Setup node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4
with:
node-version: "20"
registry-url: "https://npm.pkg.github.com"
scope: "@glasskube"
- name: Install scout
shell: sh
run: npm install -g @glasskube/scout
env:
NODE_AUTH_TOKEN: ${{ inputs.token }}

0 comments on commit bb0953b

Please sign in to comment.