From 8ffbd12803f1cdab3d0f38fcd8c67372beb5e133 Mon Sep 17 00:00:00 2001 From: Rplus Date: Thu, 28 Sep 2023 18:54:30 +0800 Subject: [PATCH] test actions --- .github/workflows/github-actions-demo.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/github-actions-demo.yaml b/.github/workflows/github-actions-demo.yaml index e7f5ac9a..7ab970d1 100644 --- a/.github/workflows/github-actions-demo.yaml +++ b/.github/workflows/github-actions-demo.yaml @@ -1,18 +1,18 @@ name: GitHub Actions Demo run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 on: [push] +env: + today: | + echo "$(date '+%F')" + jobs: Explore-GitHub-Actions: runs-on: ubuntu-latest steps: - - name: set today - run: echo "TODAY=$(date '+%F')" >> $GITHUB_ENV - - name: set latset commit date as environment variable - run: "LATEST_COMMIT_DATE=$(git rev-parse --short "$GITHUB_SHA")" >> "$GITHUB_ENV" - - name: show latest date - run: | - echo "= today: ${{ TODAY }}" - echo "= latest commit date: ${{ env.LATEST_COMMIT_DATE }}" + # - name: Dynamically set latset commit date as environment variable + # run: echo "LATEST_DATE=$(git log -1 --format=%cd --date=format:%F)" >> $GITHUB_ENV + - name: show today + run: echo "today: ${{ env.today }}" # - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event. :)" # - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" # - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."