Skip to content

Commit

Permalink
repository secret
Browse files Browse the repository at this point in the history
  • Loading branch information
corvinFn authored and corvinFn committed Oct 19, 2023
1 parent f4b1d91 commit c904d89
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 }}

0 comments on commit c904d89

Please sign in to comment.