-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
release-->main #1
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Generate Action Code | ||
description: Generates the action code | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
check-latest: true | ||
cache: 'npm' | ||
- name: Generate action code | ||
shell: bash | ||
run: | | ||
npm clean-install | ||
npm run build | ||
npm run pack |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
paths-ignore: | ||
- node_modules | ||
- dist | ||
- lib |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: github-actions | ||
directories: | ||
- / | ||
- .github/actions/generate-action-code | ||
open-pull-requests-limit: 10 | ||
schedule: | ||
interval: daily | ||
time: '07:00' | ||
timezone: Europe/Berlin | ||
assignees: | ||
- ffried | ||
reviewers: | ||
- ffried | ||
|
||
- package-ecosystem: npm | ||
directory: / | ||
open-pull-requests-limit: 10 | ||
schedule: | ||
interval: daily | ||
time: '07:00' | ||
timezone: Europe/Berlin | ||
assignees: | ||
- ffried | ||
reviewers: | ||
- ffried |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Release GitHub Actions | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
description: "Tag for the release" | ||
required: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
release: | ||
permissions: | ||
actions: read | ||
id-token: write | ||
contents: write | ||
uses: step-security/reusable-workflows/.github/workflows/actions_release.yaml@v1 | ||
with: | ||
tag: "${{ github.event.inputs.tag }}" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: CodeQL | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths-ignore: [ 'dist/*.js' ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ main ] | ||
schedule: | ||
- cron: '15 11 * * 1' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: [ 'javascript' ] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
config-file: ./.github/codeql/config.yml | ||
languages: ${{ matrix.language }} | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v3 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 https://git.io/JvXDl | ||
|
||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
|
||
#- run: | | ||
# make bootstrap | ||
# make release | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Update Release Tags | ||
|
||
on: | ||
release: | ||
types: [ published ] | ||
|
||
jobs: | ||
update-tags: | ||
if: ${{ !github.event.release.prerelease }} | ||
name: Update Running Releases | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: step-security/running-release-tags-action@v3 | ||
with: | ||
update-full-release: true | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- 'dist/*.js' | ||
- '.github/workflows/tests.yml' | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
test-specific-version: | ||
name: Test Specific Version | ||
strategy: | ||
matrix: | ||
version: [ '2.26.1', '2.49.0' ] | ||
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Generate action code | ||
if: ${{ github.event_name == 'pull_request' }} | ||
uses: ./.github/actions/generate-action-code | ||
- uses: step-security/setup-gh-cli-action@main | ||
if: ${{ github.event_name == 'push' }} | ||
id: install-gh-main | ||
with: | ||
version: ${{ matrix.version }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: './' | ||
if: ${{ github.event_name == 'pull_request' }} | ||
id: install-gh-local | ||
with: | ||
version: ${{ matrix.version }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- id: install-gh | ||
shell: bash | ||
env: | ||
EVENT_NAME: ${{ github.event_name }} | ||
BRANCH_INSTALLED_VERSION: ${{ steps.install-gh-main.outputs.installed-version }} | ||
LOCAL_INSTALLED_VERSION: ${{ steps.install-gh-local.outputs.installed-version }} | ||
run: | | ||
if [ "${EVENT_NAME}" == 'push' ]; then | ||
echo "installed-version=${BRANCH_INSTALLED_VERSION}" >> "${GITHUB_OUTPUT}" | ||
else | ||
echo "installed-version=${LOCAL_INSTALLED_VERSION}" >> "${GITHUB_OUTPUT}" | ||
fi | ||
- name: Check installed version | ||
env: | ||
REQUESTED_VERSION: ${{ matrix.version }} | ||
INSTALLED_VERSION: ${{ steps.install-gh.outputs.installed-version }} | ||
shell: bash | ||
run: | | ||
gh version | grep -q "${REQUESTED_VERSION}" | ||
gh version | grep -q "${INSTALLED_VERSION}" | ||
|
||
test-rolling-version: | ||
name: Test Rolling Version | ||
strategy: | ||
matrix: | ||
version: [ 'stable', 'latest' ] | ||
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Generate action code | ||
if: ${{ github.event_name == 'pull_request' }} | ||
uses: ./.github/actions/generate-action-code | ||
- uses: step-security/setup-gh-cli-action@main | ||
if: ${{ github.event_name == 'push' }} | ||
id: install-gh-main | ||
with: | ||
version: ${{ matrix.version }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: './' | ||
if: ${{ github.event_name == 'pull_request' }} | ||
id: install-gh-local | ||
with: | ||
version: ${{ matrix.version }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
- id: install-gh | ||
shell: bash | ||
env: | ||
EVENT_NAME: ${{ github.event_name }} | ||
BRANCH_INSTALLED_VERSION: ${{ steps.install-gh-main.outputs.installed-version }} | ||
LOCAL_INSTALLED_VERSION: ${{ steps.install-gh-local.outputs.installed-version }} | ||
run: | | ||
if [ "${EVENT_NAME}" == 'push' ]; then | ||
echo "installed-version=${BRANCH_INSTALLED_VERSION}" >> "${GITHUB_OUTPUT}" | ||
else | ||
echo "installed-version=${LOCAL_INSTALLED_VERSION}" >> "${GITHUB_OUTPUT}" | ||
fi | ||
- name: Check installed version | ||
shell: bash | ||
env: | ||
REQUESTED_VERSION: ${{ matrix.version }} | ||
INSTALLED_VERSION: ${{ steps.install-gh.outputs.installed-version }} | ||
run: gh version | grep -q "${INSTALLED_VERSION}" | ||
|
||
test-no-token: | ||
name: Test without token | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Generate action code | ||
if: ${{ github.event_name == 'pull_request' }} | ||
uses: ./.github/actions/generate-action-code | ||
- uses: step-security/setup-gh-cli-action@main | ||
if: ${{ github.event_name == 'push' }} | ||
id: install-gh-main | ||
with: | ||
version: stable | ||
- uses: './' | ||
if: ${{ github.event_name == 'pull_request' }} | ||
id: install-gh-local | ||
with: | ||
version: stable | ||
- id: install-gh | ||
env: | ||
EVENT_NAME: ${{ github.event_name }} | ||
BRANCH_INSTALLED_VERSION: ${{ steps.install-gh-main.outputs.installed-version }} | ||
LOCAL_INSTALLED_VERSION: ${{ steps.install-gh-local.outputs.installed-version }} | ||
shell: bash | ||
run: | | ||
if [ "${EVENT_NAME}" == 'push' ]; then | ||
echo "installed-version=${BRANCH_INSTALLED_VERSION}" >> "${GITHUB_OUTPUT}" | ||
else | ||
echo "installed-version=${LOCAL_INSTALLED_VERSION}" >> "${GITHUB_OUTPUT}" | ||
fi | ||
- name: Check installed version | ||
shell: bash | ||
env: | ||
INSTALLED_VERSION: ${{ steps.install-gh.outputs.installed-version }} | ||
run: gh version | grep -q "${INSTALLED_VERSION}" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
.DS_Store | ||
|
||
.idea/ | ||
|
||
node_modules/ | ||
|
||
# Lib is just temporary - so we ignore it | ||
lib/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2024 StepSecurity | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,32 @@ | ||
# setup-gh-cli-action | ||
# Setup GH CLI Action | ||
|
||
|
||
A GitHub action that installs or updates the `gh` CLI. | ||
|
||
## Inputs | ||
|
||
### `version` | ||
|
||
The `gh` version to install.<br/> | ||
Can also be set to `latest` to install the latest available version (including prereleases), or `stable` to install the latest stable release.<br/> | ||
Defaults to `stable`. | ||
|
||
### `github-token` | ||
|
||
The token to use for retrieving the release. Can be set to `${{secrets.GITHUB_TOKEN}}`.<br/> | ||
Use this if you hit rate limits. | ||
|
||
## Outputs | ||
|
||
### `full-version` | ||
|
||
The full version was installed. | ||
|
||
|
||
## Example Usage | ||
|
||
```yaml | ||
uses: step-security/setup-gh-cli-action@v2 | ||
with: | ||
version: stable | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Security Policy | ||
|
||
## Reporting a Vulnerability | ||
|
||
Please report security vulnerabilities to [email protected] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Setup GitHub CLI | ||
description: Installs or updates the GitHub CLI (gh) | ||
author: ser.soft GmbH | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. author? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
inputs: | ||
version: | ||
description: The `gh` version to install. Can also be set to `latest` to install the latest available version (including prereleases), or `stable` to install the latest stable release. | ||
default: stable | ||
required: true | ||
github-token: | ||
description: The token to use for retrieving the release. Can be set to `secrets.GITHUB_TOKEN`. Use this if you hit rate limits. | ||
required: false | ||
outputs: | ||
installed-version: | ||
description: The full version that was installed. | ||
runs: | ||
using: node20 | ||
main: dist/index.js | ||
branding: | ||
color: white | ||
icon: terminal |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this workflow for? do we even have running-release-tags-action?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, my bad, removed