Skip to content

Commit

Permalink
adjust workflow to include dynamic variables2
Browse files Browse the repository at this point in the history
  • Loading branch information
alisha-k-kalladassery committed Dec 5, 2024
1 parent 8e5a6bc commit c59814e
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/first-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@ jobs:
steps:
- name: Get repository name and date
run: |
echo "REPO_NAME=${{ github.repository }}" >> $GITHUB_ENV
echo "CURRENT_DATE=$(date + '%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV
- name: Print ${GREETING_MESSAGE}
echo "REPO_NAME=${{ github.repository }}" >> $GITHUB_ENV
echo "CURRENT_DATE=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV
- name: Print ${GREETING_MESSAGE} with repo and date
run: echo "${GREETING_MESSAGE} from ${{ env.REPO_NAME }} at ${{ env.CURRENT_DATE }}"

say-goodbye:
needs: say-hello
runs-on: ubuntu-latest
if: github.status_code == '0'
if: success()
steps:
- name: Print ${GOODBYE_MESSAGE}
run: echo "${GOODBYE_MESSAGE}"
- name: Get repository name and date
run: |
echo "REPO_NAME=${{ github.repository }}" >> $GITHUB_ENV
echo "CURRENT_DATE=$(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV
- name: Print ${GOODBYE_MESSAGE} with repo and date
run: echo "${GOODBYE_MESSAGE} from ${{ env.REPO_NAME }} at ${{ env.CURRENT_DATE }}"

0 comments on commit c59814e

Please sign in to comment.