Merge pull request #580 from macel94/patch-1

Updates to GH workflows action versions in templates
This commit is contained in:
Wael Kdouh 2024-07-08 20:18:34 +00:00 коммит произвёл GitHub
Родитель 3a9cc89b62 63782f0f0d
Коммит 0f40d197d4
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
3 изменённых файлов: 12 добавлений и 13 удалений

Просмотреть файл

@ -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' }}
@ -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:
@ -155,10 +155,10 @@ 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:
@ -166,7 +166,7 @@ jobs:
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:
@ -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

Просмотреть файл

@ -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: "#}"

Просмотреть файл

@ -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