Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to GH workflows action versions in templates #580

Merged
merged 3 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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