Skip to content

Commit cf39b78

Browse files
committed
Set date env var for golang-ling CI action
Replace deprecated "set-output" command with the recommended method of setting an environment variable. See: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
1 parent 41bd343 commit cf39b78

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/lint.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,16 @@ jobs:
1515
with:
1616
go-version-file: go.mod
1717
- name: Get date
18-
id: get-date
1918
shell: bash
2019
run: |
21-
echo "::set-output name=date::$(date -u "+%Y-%m")"
20+
echo "DATE=$(date -u '+%Y-%m')" >> $GITHUB_ENV
2221
- name: Restore golangci-lint cache
2322
uses: actions/cache@v4
2423
timeout-minutes: 10
2524
continue-on-error: true
2625
with:
2726
path: ${{ runner.temp }}/golangci-lint-cache
28-
key: ${{ runner.os }}-golangci-lint-cache-${{ steps.get-date.outputs.date }}
27+
key: ${{ runner.os }}-golangci-lint-cache-${{ env.DATE }}
2928
restore-keys: |
3029
${{ runner.os }}-golangci-lint-cache-
3130
- name: Run golangci-lint

0 commit comments

Comments
 (0)