ci(workflows): trigger ncw-server action to update submodule #4
This file contains hidden or 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
| # 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
|
||
| 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 }}" | ||