Skip to content

chore: Update workflow to use correct GitHub App token ID #11

chore: Update workflow to use correct GitHub App token ID

chore: Update workflow to use correct GitHub App token ID #11

Workflow file for this run

on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
name: "Release new actions"
jobs:
changelist:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
# Assume that the last merge to `main` always happens in less than 100 last commits
fetch-depth: 100
- name: Additional checkout
run: |
git fetch --no-tags --depth 100 origin "+refs/heads/main:refs/remotes/origin/main"
- name: Get actions changelist
id: changelist
run: |
CHANGELIST=$(git diff --name-only HEAD^ HEAD | grep -v ".github/workflows" | awk -F'/' 'NF > 1 { print $1 }' | awk '{ printf "\"%s\",\n", $0 }' | sort | uniq | tr '\n' ' ' | sed s/..$//g)
if [ -z "$CHANGELIST" ]
then
echo "changed_actions=nulll"
else
echo "changed_actions=${CHANGELIST}"
echo "changed_actions={\"component\": [$(echo ${CHANGELIST})]}" >> $GITHUB_OUTPUT
fi
outputs:
changed_actions: ${{ steps.changelist.outputs.changed_actions }}
release:
if: ${{ needs.changelist.outputs.changed_actions != '[]' && needs.changelist.outputs.changed_actions != '' }}
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
needs:
- changelist
strategy:
fail-fast: false
matrix: ${{fromJson(needs.changelist.outputs.changed_actions)}}
steps:
- name: get ghapp-cybersecurity-ci token
id: ghapp-cybersecurity-ci
uses: getsentry/action-github-app-token@v3
with:
app_id: ${{ secrets.CYBERSECURITY_CI_APP_ID }}
private_key: ${{ secrets.CYBERSECURITY_CI_APP_PRIVATE_KEY }}
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ steps.ghapp-cybersecurity-ci.outputs.token }}
release-type: simple
path: ${{ matrix.component }}