Skip to content

Commit 0f40d19

Browse files
authored
Merge pull request #580 from macel94/patch-1
Updates to GH workflows action versions in templates
2 parents 3a9cc89 + 63782f0 commit 0f40d19

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

tools/github_workflows/run-extractor.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
runs-on: ubuntu-latest
2929
environment: dev # change this to match the dev environment created in settings
3030
steps:
31-
- uses: actions/checkout@v3
31+
- uses: actions/checkout@v4
3232

3333
- name: Run extractor without Config Yaml
3434
if: ${{ github.event.inputs.CONFIGURATION_YAML_PATH == 'Extract All APIs' }}
@@ -144,7 +144,7 @@ jobs:
144144
shell: pwsh
145145

146146
- name: publish artifact
147-
uses: actions/upload-artifact@v2
147+
uses: actions/upload-artifact@v4
148148
env:
149149
API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH: apimartifacts # change this to the artifacts folder
150150
with:
@@ -155,18 +155,18 @@ jobs:
155155
needs: extract
156156
runs-on: [ubuntu-latest]
157157
steps:
158-
- uses: actions/checkout@v3
158+
- uses: actions/checkout@v4
159159

160160
- name: Download artifacts-from-portal
161-
uses: actions/download-artifact@v2
161+
uses: actions/download-artifact@v4
162162
env:
163163
API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH: apimartifacts # change this to the artifacts folder
164164
with:
165165
name: artifacts-from-portal
166166
path: "${{ GITHUB.WORKSPACE }}/${{ env.API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH }}"
167167

168168
- name: Create artifacts pull request
169-
uses: peter-evans/create-pull-request@v3
169+
uses: peter-evans/create-pull-request@v6
170170
env:
171171
API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH: apimartifacts # change this to the artifacts folder
172172
with:
@@ -175,4 +175,4 @@ jobs:
175175
title: "${{ env.API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH }} - extract"
176176
body: >
177177
This PR is auto-generated by Github actions workflow
178-
labels: extract, automated pr
178+
labels: extract, automated pr

tools/github_workflows/run-publisher-with-env.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@ jobs:
2727
environment: ${{ inputs.API_MANAGEMENT_ENVIRONMENT }}
2828
steps:
2929
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
30-
- uses: actions/checkout@v3
30+
- uses: actions/checkout@v4
3131
with:
3232
fetch-depth: 2
3333

3434
# Run Spectral
35-
- uses: actions/setup-node@v3
35+
- uses: actions/setup-node@v4
3636
with:
37-
node-version: "14"
38-
- run: npm install -g @stoplight/spectral
37+
node-version: "20"
38+
- run: npm install -g @stoplight/spectral-cli
3939
- run: spectral lint "${{ GITHUB.WORKSPACE }}/${{ inputs.API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH }}\apis\*.{json,yml,yaml}" --ruleset https://raw.githubusercontent.com/connectedcircuits/devops-api-linter/main/rules.yaml
4040

4141
# Add this step for each APIM environment and pass specific set of secrets that you want replaced in the env section below
4242
- name: "Perform namevalue secret substitution in configuration.${{ inputs.API_MANAGEMENT_ENVIRONMENT}}.yaml"
4343
if: (inputs.API_MANAGEMENT_ENVIRONMENT == 'prod' )
44-
uses: cschleiden/replace-tokens@v1.1
44+
uses: cschleiden/replace-tokens@v1.3
4545
with:
4646
tokenPrefix: "{#"
4747
tokenSuffix: "#}"

tools/github_workflows/run-publisher.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ jobs:
2525
# Set the COMMIT_ID env variable
2626
- name: Set the Commit Id
2727
id: commit
28-
run: |
29-
echo "::set-output name=commit_id::${{ github.sha }}"
28+
run: echo "commit_id=${GITHUB_SHA}" >> $GITHUB_ENV
3029
outputs:
3130
commit_id: ${{ steps.commit.outputs.commit_id }}
3231
#Publish with Commit ID

0 commit comments

Comments
 (0)