Skip to content

Commit b1a539c

Browse files
Update action versions and fix broken workflows (#4436)
* Update version of upload-artifact action * Update version of create-pull-request * Upgrade version of docker/build-push-action * Update version of upload-release-action * Create another token for docs PR * Disable scheduled workflows unless on our repo
1 parent 5f056f8 commit b1a539c

9 files changed

+28
-9
lines changed

.github/workflows/api-docs-repo.yaml

+13-2
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,21 @@ jobs:
9898
- name: Take Ownership
9999
run: sudo chown -R $USER:$USER .
100100

101+
102+
# Generating docs can take so long that the original token expires, so we create a new one
103+
# and use that to create the PR
104+
- name: Create token for PR
105+
uses: actions/create-github-app-token@v1
106+
id: pr-token
107+
with:
108+
# required
109+
app-id: ${{ secrets.AUTOMATION_ID }}
110+
private-key: ${{ secrets.AUTOMATION_KEY }}
111+
101112
- name: Create Pull Request
102-
uses: peter-evans/create-pull-request@v5.0.0
113+
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # pinned to v7.0.5
103114
with:
104-
token: ${{ steps.app-token.outputs.token }}
115+
token: ${{ steps.pr-token.outputs.token }}
105116
commit-message: Update API Docs
106117
branch: ${{ format('bot/update-api-docs-{0}', github.run_number) }}
107118
base: main

.github/workflows/build-devcontainer-image.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
password: ${{ secrets.GITHUB_TOKEN }}
3737

3838
- name: Build & push Devcontainer image
39-
uses: docker/build-push-action@v4
39+
uses: docker/build-push-action@v6
4040
with:
4141
context: .devcontainer
4242
push: true

.github/workflows/create-release-experimental.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
run: sleep 60s
6666

6767
- name: Upload release assets
68-
uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df # this is v2.7.0, but pinned
68+
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # this is v2.9.0, but pinned
6969
with:
7070
repo_token: ${{ secrets.GITHUB_TOKEN }}
7171
tag: refs/tags/${{ env.ARTIFACT_VERSION }}

.github/workflows/create-release-official.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
docker exec "$container_id" task make-release-artifacts
4343
4444
- name: Upload release assets
45-
uses: svenstaro/upload-release-action@1beeb572c19a9242f4361f4cee78f8e0d9aec5df # this is v2.7.0, but pinned
45+
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # this is v2.9.0, but pinned
4646
with:
4747
repo_token: ${{ secrets.GITHUB_TOKEN }}
4848
tag: ${{ github.ref }}

.github/workflows/helm-chart-repo.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ jobs:
105105
run: sudo chown -R $USER:$USER .
106106

107107
- name: Create Pull Request
108-
uses: peter-evans/create-pull-request@v5.0.0
108+
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # pinned to v7.0.5
109109
with:
110110
token: ${{ steps.app-token.outputs.token }}
111111
commit-message: Add Helm Chart

.github/workflows/live-validation.yml

+5
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,13 @@ jobs:
1010
test-generator:
1111
concurrency: live-resources # only permit one run at a time
1212
runs-on: [self-hosted, 1ES.Pool=aso-1es-pool]
13+
1314
permissions:
1415
contents: read
16+
17+
# Only run this scheduled job on the main repo, it can't work elsewhere
18+
if: ${{ github.repository == 'Azure/azure-service-operator' }}
19+
1520
steps:
1621
- name: Checkout code
1722
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pinned to 4.1.7

.github/workflows/pr-validation.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ jobs:
133133

134134
- name: Save JSON logs on failure
135135
if: ${{ failure() }}
136-
uses: actions/upload-artifact@v3.1.2
136+
uses: actions/upload-artifact@v4.4.3
137137
with:
138138
name: test-output
139139
path: reports/*.json
@@ -146,7 +146,7 @@ jobs:
146146
if: steps.check-changes.outputs.code-changed == 'true'
147147

148148
- name: Archive outputs
149-
uses: actions/upload-artifact@v3.1.2
149+
uses: actions/upload-artifact@v4.4.3
150150
with:
151151
name: output
152152
path: v2/bin/*

.github/workflows/pre-release-tests.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ jobs:
1414
permissions:
1515
contents: read
1616

17+
# Only run this scheduled job on the main repo, it can't work elsewhere
18+
if: ${{ github.repository == 'Azure/azure-service-operator' }}
19+
1720
steps:
1821
- name: Checkout code
1922
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # pinned to 4.1.7

.github/workflows/visualize-repo.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
should_push: false
8282

8383
- name: Create Pull Request
84-
uses: peter-evans/create-pull-request@v5.0.0
84+
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # pinned to v7.0.5
8585
with:
8686
token: ${{ steps.app-token.outputs.token }}
8787
commit-message: Update Code Structure Diagrams

0 commit comments

Comments
 (0)