Skip to content

outer.yml

outer.yml #33

Workflow file for this run

# outer.yml
name: Outer Workflow
on:
workflow_dispatch:
inputs:
test:
description: 'аываыва [Test names](https://docs.pytest.org/en/7.1.x/how-to/usage.html#specifying-which-tests-to-run)'
required: false
type: string
push:
branches:
- master
jobs:
pass-git-info:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Get commit details
id: commit-details
run: |
commit_hash=$(git rev-parse HEAD)
commit_author=$(git log --format='%an' -n 1)
commit_merger=$(git log --format='%cn' -n 1)
commit_message=$(git log --format='%s' -n 1)
commit_description=$(git log --format='%B' -n 1)
# TODO: deprecated
echo "::set-output name=commit-hash::$commit_hash"
echo "::set-output name=commit-author::$commit_author"
echo "::set-output name=commit-merger::$commit_merger"
echo "::set-output name=commit-message::$commit_message"
echo "::set-output name=commit-description::$commit_description"
# - name: Run nested workflow
# uses: ./.github/actions/inner
# 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 }}
- name: Print commit details
run: |
echo "Commit Hash: ${{ steps.commit-details.outputs.commit-hash }}"
echo "Commit Author: ${{ steps.commit-details.outputs.commit-author }}"
echo "Commit Merger: ${{ steps.commit-details.outputs.commit-merger }}"
echo "Commit Message: ${{ steps.commit-details.outputs.commit-message }}"
echo "Commit Description: ${{ steps.commit-details.outputs.commit-description }}"