Skip to content

Commit

Permalink
Merge pull request #580 from macel94/patch-1
Browse files Browse the repository at this point in the history
Updates to GH workflows action versions in templates
  • Loading branch information
waelkdouh authored Jul 8, 2024
2 parents 3a9cc89 + 63782f0 commit 0f40d19
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
12 changes: 6 additions & 6 deletions tools/github_workflows/run-extractor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest
environment: dev # change this to match the dev environment created in settings
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

- name: publish artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
env:
API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH: apimartifacts # change this to the artifacts folder
with:
Expand All @@ -155,18 +155,18 @@ jobs:
needs: extract
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download artifacts-from-portal
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
env:
API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH: apimartifacts # change this to the artifacts folder
with:
name: artifacts-from-portal
path: "${{ GITHUB.WORKSPACE }}/${{ env.API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH }}"

- name: Create artifacts pull request
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v6
env:
API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH: apimartifacts # change this to the artifacts folder
with:
Expand All @@ -175,4 +175,4 @@ jobs:
title: "${{ env.API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH }} - extract"
body: >
This PR is auto-generated by Github actions workflow
labels: extract, automated pr
labels: extract, automated pr
10 changes: 5 additions & 5 deletions tools/github_workflows/run-publisher-with-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ jobs:
environment: ${{ inputs.API_MANAGEMENT_ENVIRONMENT }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 2

# Run Spectral
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: "14"
- run: npm install -g @stoplight/spectral
node-version: "20"
- run: npm install -g @stoplight/spectral-cli
- 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

# Add this step for each APIM environment and pass specific set of secrets that you want replaced in the env section below
- name: "Perform namevalue secret substitution in configuration.${{ inputs.API_MANAGEMENT_ENVIRONMENT}}.yaml"
if: (inputs.API_MANAGEMENT_ENVIRONMENT == 'prod' )
uses: cschleiden/replace-tokens@v1.1
uses: cschleiden/replace-tokens@v1.3
with:
tokenPrefix: "{#"
tokenSuffix: "#}"
Expand Down
3 changes: 1 addition & 2 deletions tools/github_workflows/run-publisher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ jobs:
# Set the COMMIT_ID env variable
- name: Set the Commit Id
id: commit
run: |
echo "::set-output name=commit_id::${{ github.sha }}"
run: echo "commit_id=${GITHUB_SHA}" >> $GITHUB_ENV
outputs:
commit_id: ${{ steps.commit.outputs.commit_id }}
#Publish with Commit ID
Expand Down

0 comments on commit 0f40d19

Please sign in to comment.