Skip to content

ci(gh actions): reviewed permissions, secret names and use of OS var #210

ci(gh actions): reviewed permissions, secret names and use of OS var

ci(gh actions): reviewed permissions, secret names and use of OS var #210

Workflow file for this run

name: Release
on:
push:
branches:
- master
jobs:
build:

Check failure on line 8 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Release

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 8, Col: 3): Error calling workflow 'centralnicgroup-opensource/rtldev-middleware-java-sdk/.github/workflows/test.yml@657b2852e90086d03d717b316f34d842f83e8e42'. The nested job 'test_matrix' is requesting 'contents: write, deployments: write', but is only allowed 'contents: read, deployments: none'.
name: Build
uses: ./.github/workflows/test.yml
permissions:
contents: read
packages: write
release:
name: Release @ ubuntu-latest
runs-on: ${{ vars.RTLDEV_MW_CI_OS }}
permissions:
contents: write
issues: write
deployments: write
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-java@v3
with:
java-version: ${{ vars.RTLDEV_MW_CI_JAVA_VERSION }}
distribution: ${{ vars.RTLDEV_MW_CI_JAVA_DISTRO }}
- name: Setup NodeJS ${{ vars.RTLDEV_MW_CI_NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: ${{ vars.RTLDEV_MW_CI_NODE_VERSION }}
check-latest: true
cache: "npm"
- name: Download Artifacts
uses: actions/download-artifact@v3
id: download
with:
name: coverage
- run: |
rm -rf target
unzip -qq -o target.zip
rm target.zip
- name: Install dependencies
run: npm ci
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.RTLDEV_MW_CI_TOKEN }}
MAVEN_OPTS: ${{ vars.MAVEN_OPTS }}
OSSRH_JIRA_USERNAME: ${{ secrets.OSSRH_JIRA_USERNAME }}
OSSRH_JIRA_PASSWORD: ${{ secrets.OSSRH_JIRA_PASSWORD }}
ENCRYPTED_C9F9AEDF26B7_KEY: ${{ secrets.ENCRYPTED_C9F9AEDF26B7_KEY }}
ENCRYPTED_C9F9AEDF26B7_IV: ${{ secrets.ENCRYPTED_C9F9AEDF26B7_IV }}
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
RTLDEV_MW_NOTIFICATION_URI: ${{ secrets.RTLDEV_MW_CI_NOTIFICATION_URI }}
run: |
openssl aes-256-cbc -K $ENCRYPTED_C9F9AEDF26B7_KEY -iv $ENCRYPTED_C9F9AEDF26B7_IV -in codesigning.asc.enc -out codesigning.asc -d
gpg --import --batch codesigning.asc
npx semantic-release