Skip to content

Conversation

@roverflow
Copy link
Member

Creates the labtitle based on the github action event triggered and appends the lab title to single.yml file.

Below is the specific job that does it:

- name: Create the lab title
  run: |
    if [[ "${{ github.event_name }}" == 'pull_request_target' ]]; then
      echo "CLABTITLE=${{ inputs.lab_title }}_PR${{ github.event.pull_request.number }}" >> $GITHUB_ENV
    elif [[ "${{ github.event_name }}" == 'workflow_dispatch' ]]; then
      shashort=$(echo ${{ github.sha }} | cut -c 1-30)
      uuidval=$(uuidgen | cut -c 1-8)
      echo "CLABTITLE=${{ inputs.lab_title }}_${shashort}_${uuidval}" >> $GITHUB_ENV
    fi

@roverflow roverflow requested a review from NilashishC April 16, 2024 13:44
@roverflow roverflow merged commit fe5227f into ansible-network:main Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants