From c904d89d67268aa0911ee8c1ba4c2118920b4035 Mon Sep 17 00:00:00 2001 From: corvinFn Date: Thu, 19 Oct 2023 17:21:36 +0800 Subject: [PATCH] repository secret --- .github/workflows/ci.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d1c1bb..c4d69c3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,10 +5,13 @@ on: branches: - master schedule: - - cron: '0 20 * * 0' + - cron: '0 20 * * Sat' push: +env: + GLOBAL_ENV: global_env_value + DAY_OF_WEEK: ThursDay jobs: build: @@ -25,14 +28,20 @@ jobs: # go-version: '1.19.x' # go-version: 'stable' - - name: Build + - name: Build ${{ github.ref_name }} run: go build -v ./... - name: Test run: go test -v ./... - name: Use variables + if: {{ env.DAY_OF_WEEK == 'ThursDay' }} + # if [[ env.DAY_OF_WEEK == 'ThursDay' ]]; then + # fi run: | echo "repository variable : $REPOSITORY_VAR" + echo "secret var : $REPOSITORY_SECRET" + echo "global env : $GLOBAL_ENV" env: REPOSITORY_VAR: ${{ vars.REPOSITORY_VAR }} + REPOSITORY_SECRET: ${{ secrets.SECRET_TEST_NAME }}