diff --git a/.github/workflows/first-workflow.yml b/.github/workflows/first-workflow.yml index cc93c88..569b1eb 100644 --- a/.github/workflows/first-workflow.yml +++ b/.github/workflows/first-workflow.yml @@ -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 }}"