Skip to content

fix: allow write

fix: allow write #965

Workflow file for this run

on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: read
jobs:
tests:
uses: ./.github/workflows/tests.yaml
integration-tests:
uses: ./.github/workflows/integration-tests.yaml
publish-integration-tests-report:
needs: integration-tests
if: ${{ ! cancelled() }}
permissions:
contents: write
uses: ./.github/workflows/publish-integration-tests-report.yaml
with:
dmss_version: ${{ needs.integration-tests.outputs.dmss_version }}
dm_cli_version: ${{ needs.integration-tests.outputs.dm_cli_version }}
job_version: ${{ needs.integration-tests.outputs.job_version }}
update_readme: ${{ needs.integration-tests.result == 'success' }}
release-please:
needs: [tests, integration-tests]
permissions:
contents: write
pull-requests: write
uses: ./.github/workflows/create-release-pr.yaml
secrets:
RELEASE_PLEASE_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }}
publish-packages:
needs: release-please
if: ${{ needs.release-please.outputs.releases_created }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
- name: Install dependencies
run: yarn install
- name: Build packages
run: yarn build:packages
- name: Publish dm-core package
run: |
PACKAGE_VERSION=$(cat packages/dm-core/package.json | jq '.["version"]' | tr -d '"')
PACKAGE_NAME=$(cat packages/dm-core/package.json | jq '.["name"]' | tr -d '"')
VERSION_EXISTS=$(curl --HEAD --output /dev/null --silent -w "%{http_code}" https://registry.npmjs.org/$PACKAGE_NAME/$PACKAGE_VERSION)
if [[ $VERSION_EXISTS == 404 ]]; then
yarn workspace @development-framework/dm-core publish --access public
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish dm-core-plugins package
run: |
PACKAGE_VERSION=$(cat packages/dm-core-plugins/package.json | jq '.["version"]' | tr -d '"')
PACKAGE_NAME=$(cat packages/dm-core-plugins/package.json | jq '.["name"]' | tr -d '"')
VERSION_EXISTS=$(curl --HEAD --output /dev/null --silent -w "%{http_code}" https://registry.npmjs.org/$PACKAGE_NAME/$PACKAGE_VERSION)
if [[ $VERSION_EXISTS == 404 ]]; then
yarn workspace @development-framework/dm-core-plugins publish --access public
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
new-release:

Check failure on line 78 in .github/workflows/on-main-push.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/on-main-push.yaml

Invalid workflow file

The workflow is not valid. .github/workflows/on-main-push.yaml (Line: 78, Col: 3): Error calling workflow 'equinor/dm-core-packages/.github/workflows/on-release.yaml@215d7d46f52250cf573dc8c1418a37bfe5a8ef6e'. The workflow is requesting 'contents: write', but is only allowed 'contents: read'.
needs: publish-packages
permissions:
packages: write
contents: read
id-token: write
uses: ./.github/workflows/on-release.yaml
with:
release-tag: ${{ needs.release-please.outputs.tag_name }}