Skip to content

Commit 8d026ed

Browse files
Roberto Sorasilvanocerza
Roberto Sora
andauthored
Bump workflows actions versions (#1078)
* Bump actions/cache to v2 * Bump actions/checkout to v2 * Pin actions/create-release to v1 * Bump actions/download-artifact to v2 and maitain compatibility * Bump actions/github-scripts to v3 * Bump actions/upload-artifact to v2 * Bump peter-evans/create-pull-request to v3 * Bump svenstaro/upload-release-action to v2 * Fix issue with actions/checkout@v2 In certain workflows we use a custom Docker image for cross-compilation, this image is old and unmaintained so it has an old version of git and the latest version actions/checkout doesn't support it. This causes the action to fallback to the Github API to download the files but that doesn't create a git repository, thus the history is lost but goreleaser needs it to generate the changelog so it fails. So we use the older version of the action in certain cases to avoid this failures. Co-authored-by: Silvano Cerza <[email protected]>
1 parent 5edef82 commit 8d026ed

13 files changed

+42
-27
lines changed

.github/workflows/arduino-stats.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v1
17+
uses: actions/checkout@v2
1818

1919
- name: Fetch downloads count form Arduino CDN using AWS Athena
2020
id: fetch

.github/workflows/github-stats.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
steps:
1616
- name: Fetch downloads count
1717
id: fetch
18-
uses: actions/github-script@0.2.0
18+
uses: actions/github-script@v3
1919
with:
2020
github-token: ${{github.token}}
2121
script: |

.github/workflows/i18n-nightly-push.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@master
16+
uses: actions/checkout@v2
1717

1818
- name: Install Go
1919
uses: actions/setup-go@v2

.github/workflows/i18n-weekly-pull.yaml

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
16-
uses: actions/checkout@master
16+
uses: actions/checkout@v2
1717

1818
- name: Install Go
1919
uses: actions/setup-go@v2
@@ -37,8 +37,9 @@ jobs:
3737
TRANSIFEX_API_KEY: ${{ secrets.TRANSIFEX_API_KEY }}
3838

3939
- name: Create Pull Request
40-
uses: peter-evans/create-pull-request@v2
40+
uses: peter-evans/create-pull-request@v3
4141
with:
4242
commit-message: Updated translation files
4343
title: Updated translation files
4444
branch: i18n/translations-update
45+
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

.github/workflows/link-validation.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
architecture: "x64"
4343

4444
- name: Cache dependencies
45-
uses: actions/cache@v1
45+
uses: actions/cache@v2
4646
with:
4747
path: ~/.cache/pip
4848
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}

.github/workflows/nightly.yaml

+11-5
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,16 @@ jobs:
2121
steps:
2222
- name: checkout
2323
uses: actions/checkout@v1
24+
with:
25+
fetch-depth: 0
2426

2527
- name: build
2628
env:
2729
PACKAGE_NAME_PREFIX: ${{ github.workflow }}
2830
run: goreleaser --snapshot
2931

3032
- name: Upload artifacts
31-
uses: actions/upload-artifact@v1
33+
uses: actions/upload-artifact@v2
3234
with:
3335
name: dist
3436
path: dist
@@ -39,12 +41,14 @@ jobs:
3941

4042
steps:
4143
- name: Checkout
42-
uses: actions/checkout@v1
44+
uses: actions/checkout@v2
4345

4446
- name: Download artifacts
45-
uses: actions/download-artifact@v1
47+
uses: actions/download-artifact@v2
4648
with:
4749
name: dist
50+
# to ensure compatibility with v1
51+
path: dist
4852

4953
- name: Import Code-Signing Certificates
5054
env:
@@ -86,7 +90,7 @@ jobs:
8690
perl -pi -w -e "s/.*${PACKAGE_FILENAME}/${CLI_CHECKSUM} ${PACKAGE_FILENAME}/g;" dist/*-checksums.txt
8791
8892
- name: Upload artifacts
89-
uses: actions/upload-artifact@v1
93+
uses: actions/upload-artifact@v2
9094
with:
9195
name: dist
9296
path: dist
@@ -97,9 +101,11 @@ jobs:
97101

98102
steps:
99103
- name: Download artifact
100-
uses: actions/download-artifact@v1
104+
uses: actions/download-artifact@v2
101105
with:
102106
name: dist
107+
# to ensure compatibility with v1
108+
path: dist
103109

104110
- name: upload
105111
uses: docker://plugins/s3

.github/workflows/publish-docs.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ jobs:
7070
architecture: "x64"
7171

7272
- name: Cache dependencies
73-
uses: actions/cache@v1
73+
uses: actions/cache@v2
7474
with:
7575
path: ~/.cache/pip
7676
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}

.github/workflows/python-lint.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@master
20+
uses: actions/checkout@v2
2121

2222
- name: Install Taskfile
2323
uses: Arduino/actions/setup-taskfile@master

.github/workflows/release.yaml

+14-8
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ jobs:
1818
steps:
1919
- name: Checkout
2020
uses: actions/checkout@v1
21+
with:
22+
fetch-depth: 0
2123

2224
- name: Build
2325
run: goreleaser
2426

2527
- name: Upload artifacts
26-
uses: actions/upload-artifact@v1
28+
uses: actions/upload-artifact@v2
2729
with:
2830
name: dist
2931
path: dist
@@ -34,12 +36,14 @@ jobs:
3436

3537
steps:
3638
- name: Checkout
37-
uses: actions/checkout@v1
39+
uses: actions/checkout@v2
3840

3941
- name: Download artifacts
40-
uses: actions/download-artifact@v1
42+
uses: actions/download-artifact@v2
4143
with:
4244
name: dist
45+
# to ensure compatibility with v1
46+
path: dist
4347

4448
- name: Import Code-Signing Certificates
4549
env:
@@ -81,7 +85,7 @@ jobs:
8185
perl -pi -w -e "s/.*arduino-cli_${TAG}_macOS_64bit.tar.gz/${CLI_CHECKSUM} arduino-cli_${TAG}_macOS_64bit.tar.gz/g;" dist/*-checksums.txt
8286
8387
- name: Upload artifacts
84-
uses: actions/upload-artifact@v1
88+
uses: actions/upload-artifact@v2
8589
with:
8690
name: dist
8791
path: dist
@@ -92,12 +96,14 @@ jobs:
9296

9397
steps:
9498
- name: Checkout
95-
uses: actions/checkout@v1
99+
uses: actions/checkout@v2
96100

97101
- name: Download artifact
98-
uses: actions/download-artifact@v1
102+
uses: actions/download-artifact@v2
99103
with:
100104
name: dist
105+
# to ensure compatibility with v1
106+
path: dist
101107

102108
- name: Read CHANGELOG
103109
id: changelog
@@ -120,7 +126,7 @@ jobs:
120126
121127
- name: Create Github Release
122128
id: create_release
123-
uses: actions/create-release@master
129+
uses: actions/create-release@v1
124130
env:
125131
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
126132
with:
@@ -131,7 +137,7 @@ jobs:
131137
prerelease: ${{ steps.prerelease.outputs.IS_PRE }}
132138

133139
- name: Upload release files on Github
134-
uses: svenstaro/upload-release-action@v1-release
140+
uses: svenstaro/upload-release-action@v2
135141
with:
136142
repo_token: ${{ secrets.GITHUB_TOKEN }}
137143
file: dist/*

.github/workflows/stale.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
steps:
1414
- name: Mark stale
1515
if: github.event_name == 'schedule'
16-
uses: actions/github-script@0.2.0
16+
uses: actions/github-script@v3
1717
with:
1818
github-token: ${{github.token}}
1919
script: |
@@ -47,7 +47,7 @@ jobs:
4747
4848
- name: Mark active
4949
if: github.event_name == 'issue_comment'
50-
uses: actions/github-script@0.2.0
50+
uses: actions/github-script@v3
5151
with:
5252
github-token: ${{github.token}}
5353
script: |
@@ -75,7 +75,7 @@ jobs:
7575
7676
- name: Close stale
7777
if: github.event_name == 'schedule'
78-
uses: actions/github-script@0.2.0
78+
uses: actions/github-script@v3
7979
with:
8080
github-token: ${{github.token}}
8181
script: |

.github/workflows/test.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
run: git config --global core.autocrlf false
1818

1919
- name: Checkout
20-
uses: actions/checkout@master
20+
uses: actions/checkout@v2
2121

2222
- name: Install Go
2323
uses: actions/setup-go@v2
@@ -114,6 +114,8 @@ jobs:
114114
steps:
115115
- name: checkout
116116
uses: actions/checkout@v1
117+
with:
118+
fetch-depth: 0
117119

118120
- name: build
119121
shell: bash

.github/workflows/validate-docs.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ jobs:
5757
architecture: "x64"
5858

5959
- name: Cache dependencies
60-
uses: actions/cache@v1
60+
uses: actions/cache@v2
6161
with:
6262
path: ~/.cache/pip
6363
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}

.github/workflows/verify-formatting.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222

2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@master
25+
uses: actions/checkout@v2
2626

2727
- name: Install Taskfile
2828
uses: Arduino/actions/setup-taskfile@master

0 commit comments

Comments
 (0)