Skip to content

Commit

Permalink
abc (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxBlazer authored Sep 20, 2023
1 parent 440b0ca commit bd0209e
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/inner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Inner Workflow

on:
workflow_run:

jobs:
print-inputs:
runs-on: ubuntu-latest

steps:
- name: Print commit details
run: |
echo "Commit Hash: ${{ github.event.inputs.commit-hash }}"
echo "Commit Author: ${{ github.event.inputs.commit-author }}"
echo "Commit Merger: ${{ github.event.inputs.commit-merger }}"
echo "Commit Message: ${{ github.event.inputs.commit-message }}"
echo "Commit Description: ${{ github.event.inputs.commit-description }}"
37 changes: 37 additions & 0 deletions .github/workflows/outer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Outer Workflow

on:
push:
branches:
- master

jobs:
pass-git-info:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Git
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
- name: Get commit details
id: commit-details
run: |
echo "::set-output name=commit-hash::${{ github.sha }}"
echo "::set-output name=commit-author::${{ github.event.pull_request.user.login }}"
echo "::set-output name=commit-merger::${{ github.event.pull_request.merged_by.login }}"
echo "::set-output name=commit-message::${{ github.event.head_commit.message }}"
echo "::set-output name=commit-description::${{ github.event.head_commit.message }}"
- name: Run nested workflow
uses: ./.github/workflows/inner.yml
with:
commit-hash: ${{ steps.commit-details.outputs.commit-hash }}
commit-author: ${{ steps.commit-details.outputs.commit-author }}
commit-merger: ${{ steps.commit-details.outputs.commit-merger }}
commit-message: ${{ steps.commit-details.outputs.commit-message }}
commit-description: ${{ steps.commit-details.outputs.commit-description }}

0 comments on commit bd0209e

Please sign in to comment.