Skip to content

ci(workflows): trigger ncw-server action to update submodule #4

ci(workflows): trigger ncw-server action to update submodule

ci(workflows): trigger ncw-server action to update submodule #4

# SPDX-FileCopyrightText: 2024 IONOS Productivity
# SPDX-License-Identifier: MIT
name: Trigger ncw-server submodule update
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
jobs:
get-commit-info:
runs-on: [self-hosted]
outputs:
sha: ${{ steps.commit-info.outputs.sha }}
short_sha: ${{ steps.commit-info.outputs.short_sha }}
message: ${{ steps.commit-info.outputs.message }}
author: ${{ steps.commit-info.outputs.author }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Get commit information
id: commit-info
run: |
echo "sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT
echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "message=$(git log -1 --pretty=format:'%s')" >> $GITHUB_OUTPUT
echo "author=$(git log -1 --pretty=format:'%an')" >> $GITHUB_OUTPUT
call-submodule-update:

Check failure on line 37 in .github/workflows/submodule-trigger-workflow.yml

View workflow run for this annotation

GitHub Actions / Trigger ncw-server submodule update

Invalid workflow file

The workflow is not valid. .github/workflows/submodule-trigger-workflow.yml (Line: 37, Col: 3): Error calling workflow 'IONOS-Productivity/ncw-server/.github/workflows/update-submodule-pr.yml@kh/dev/auto-update-submodules'. The workflow is requesting 'pull-requests: write', but is only allowed 'pull-requests: none'.
needs: get-commit-info
uses: IONOS-Productivity/ncw-server/.github/workflows/update-submodule-pr.yml@kh/dev/auto-update-submodules
with:
submodule_name: "IONOS"
submodule_repo: ${{ github.repository }}
commit_sha: ${{ needs.get-commit-info.outputs.sha }}
commit_message: ${{ needs.get-commit-info.outputs.message }}
trigger_repo: ${{ github.repository }}
trigger_ref: ${{ github.ref }}
log-details:
needs: [get-commit-info, call-submodule-update]
runs-on: [self-hosted]
if: always()
steps:
- name: Log trigger details
run: |
echo "::notice::✅ Triggered ncw-server submodule update workflow"
echo "::notice::📦 Submodule: IONOS"
echo "::notice::🔗 Commit: ${{ needs.get-commit-info.outputs.sha }}"
echo "::notice::💬 Message: ${{ needs.get-commit-info.outputs.message }}"
echo "::notice::👤 Author: ${{ needs.get-commit-info.outputs.author }}"