Skip to content

Commit

Permalink
Merge pull request #258 from im-practices/version-updates3
Browse files Browse the repository at this point in the history
ARCH-2035 - Updating to latest versions of actions
  • Loading branch information
danielle-casella-adams committed Mar 26, 2024
2 parents e8dec93 + 225bad9 commit 50dd97e
Show file tree
Hide file tree
Showing 31 changed files with 1,903 additions and 1,903 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/im-reusable-finish-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ jobs:
- name: Send status to team's notification channel
if: always()
continue-on-error: true
uses: im-open/post-status-to-teams-action@v1.3
uses: im-open/post-status-to-teams-action@v1.4
with:
title: ${{ inputs.title-of-teams-post }}
workflow-status: ${{ steps.conclusion.outputs.workflow_conclusion }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/im-reusable-finish-deployment-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ jobs:

- name: Send status to team's notification channel
if: always()
uses: im-open/post-status-to-teams-action@v1.3
uses: im-open/post-status-to-teams-action@v1.4
with:
title: ${{ inputs.title-of-teams-post }}
workflow-status: ${{ steps.conclusion.outputs.workflow_conclusion }}
Expand Down Expand Up @@ -329,7 +329,7 @@ jobs:

- name: Send Status to Deployment Notifications Channel for Prod Deploys
if: always() && steps.post-to-deployment-channel.outputs.post == 'true'
uses: im-open/post-status-to-teams-action@v1.3
uses: im-open/post-status-to-teams-action@v1.4
with:
title: ${{ inputs.title-of-teams-post }}
workflow-status: ${{ steps.conclusion.outputs.workflow_conclusion }}
Expand Down
536 changes: 268 additions & 268 deletions workflow-templates/im-build-db-ci.yml

Large diffs are not rendered by default.

44 changes: 22 additions & 22 deletions workflow-templates/im-build-dotnet-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Workflow Code: LoathsomeSnipe_v52 DO NOT REMOVE
# Workflow Code: LoathsomeSnipe_v53 DO NOT REMOVE
# Purpose:
# Automatically checks out the code, builds, run tests and creates artifacts
# which are uploaded to a GH release when commits are pushed to a PR. In the
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ needs.setup-build-workflow.outputs.REF_TO_BUILD_AND_TAG }}

Expand All @@ -88,7 +88,7 @@ jobs:

- name: Check for an npm cache
id: has-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '**/node_modules'
key: ${{ env.NPM_CACHE_KEY }}
Expand All @@ -100,14 +100,14 @@ jobs:
# This action creates a post-job step that will upload the node_modules dir to the cache if the job completes successfully
- name: Setup caching for node_modules directory if cache does not exist
if: steps.has-cache.outputs.cache-hit != 'true'
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ env.NPM_CACHE_KEY }}
path: '**/node_modules'
enableCrossOsArchive: true

- name: Setup node if cache does not exist
uses: actions/setup-node@v3
uses: actions/setup-node@v4
if: steps.has-cache.outputs.cache-hit != 'true'
with:
node-version: '16'
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ needs.setup-build-workflow.outputs.REF_TO_BUILD_AND_TAG }}

Expand All @@ -152,7 +152,7 @@ jobs:

- name: Check for a nuget cache
id: has-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: '~/.nuget/packages'
key: ${{ env.NUGET_CACHE_KEY }}
Expand All @@ -164,15 +164,15 @@ jobs:
# This action creates a post-job step that will upload the ./.nuget/packages dir to the cache if the job completes successfully
- name: Setup caching for nuget packages if cache does not exist
if: steps.has-cache.outputs.cache-hit != 'true'
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ env.NUGET_CACHE_KEY }}
path: ~/.nuget/packages
enableCrossOsArchive: true

- name: Setup .NET Core if cache does not exist
if: steps.has-cache.outputs.cache-hit != 'true'
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
env:
Expand Down Expand Up @@ -228,7 +228,7 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ env.REF_TO_BUILD_AND_TAG }}

Expand Down Expand Up @@ -276,7 +276,7 @@ jobs:
# ConnectionStrings.<<PROJECT>>: 'Server=localhost;Database=${{ env.DB_NAME }};Trusted_Connection=False;User ID=SA;Password=${{ env.SQL_SERVER_PASSWORD }}' # TODO: Verify connectionString name for app setting and any additional properties that need to be added

- name: Setup .NET Core
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
env:
Expand All @@ -296,7 +296,7 @@ jobs:
- name: create status check/comment for test results
if: always()
id: dotnet_test_check
uses: im-open/process-dotnet-test-results@v2.3
uses: im-open/process-dotnet-test-results@v3.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }} # Special per-job token generated by GH for interacting with the repo
timezone: ${{ env.TIMEZONE }}
Expand All @@ -308,7 +308,7 @@ jobs:
- name: create code coverage report
id: coverage_report
if: always() && steps.test.outcome == 'success' && env.IS_DEPENDABOT_PR == 'false'
uses: im-open/code-coverage-report-generator@4.9
uses: im-open/code-coverage-report-generator@v5.0
with:
reports: '*/**/coverage.opencover.xml'
targetdir: ${{ env.CODE_COVERAGE_DIR_DOTNET }}
Expand All @@ -324,7 +324,7 @@ jobs:
- name: create status check/comment for code coverage results
if: always() && steps.coverage_report.outcome == 'success' && env.IS_DEPENDABOT_PR == 'false'
id: dotnet_coverage_check
uses: im-open/process-code-coverage-summary@v2.2
uses: im-open/process-code-coverage-summary@v2.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }} # Special per-job token generated by GH for interacting with the repo
summary-file: '${{ env.CODE_COVERAGE_DIR_DOTNET }}/Summary.md'
Expand Down Expand Up @@ -374,7 +374,7 @@ jobs:
JEST_TEST_REPORT_NAME: 'Jest Tests'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ env.REF_TO_BUILD_AND_TAG }}

Expand All @@ -387,7 +387,7 @@ jobs:
path: '**/node_modules'

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '16'

Expand All @@ -405,7 +405,7 @@ jobs:
- name: create status check/comment for jest test results
if: always()
id: jest_test_check
uses: im-open/process-jest-test-results@v2.1
uses: im-open/process-jest-test-results@v2.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }} # Special per-job token generated by GH for interacting with the repo
timezone: ${{ env.TIMEZONE }}
Expand All @@ -419,7 +419,7 @@ jobs:
- name: create code coverage report
id: coverage_report
if: always() && steps.test.outcome == 'success' && env.IS_DEPENDABOT_PR == 'false'
uses: im-open/code-coverage-report-generator@4.9
uses: im-open/code-coverage-report-generator@v5.0
with:
reports: '*/**/lcov.info'
targetdir: ${{ env.CODE_COVERAGE_DIR_JEST }}
Expand All @@ -435,7 +435,7 @@ jobs:
- name: create status check/comment for code coverage results
if: always() && steps.coverage_report.outcome == 'success' && env.IS_DEPENDABOT_PR == 'false'
id: jest_coverage_check
uses: im-open/process-code-coverage-summary@v2.2
uses: im-open/process-code-coverage-summary@v2.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }} # Special per-job token generated by GH for interacting with the repo
summary-file: '${{ env.CODE_COVERAGE_DIR_JEST }}/Summary.md'
Expand Down Expand Up @@ -494,7 +494,7 @@ jobs:

steps:
- name: Checkout Repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ env.REF_TO_BUILD_AND_TAG }}

Expand All @@ -514,7 +514,7 @@ jobs:
path: '**/node_modules'

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: '16'

Expand All @@ -524,7 +524,7 @@ jobs:
run: npm rebuild

- name: Setup .NET Core
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
env:
Expand Down
114 changes: 57 additions & 57 deletions workflow-templates/im-build-increment-version-on-merge.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
# Workflow Code: AngryGoose_v14 DO NOT REMOVE
# Purpose:
# Automatically calculates the next semantic version and creates a tag on the repository
# when a PR is merged. The tag is used in later workflows to deploy the tf or db.
#
# Note:
# This workflow should not be used to tag repos that have CI workflows that create their own releases, like
# the dotnet ci build because this workflow would conflict with that. This workflow is recommended for
# things like infrastructure repositories or database projects that do not have a CI build which increments
# their versions.
#
# Frequency:
# This workflow should only be used once per repository
# If the repo has multiple projects that need this workflow (like db and tf), multiple tags can be generated with
# with this workflow by duplicating the increment version step and including different 'tag-prefix' args.
#
# Projects to use this Template with:
# - Azure SQL Database (Core Template)
# - On-Prem Database (Core Template)
# - Storage Account Deployments (Core Template)
# - Terraform (Core Template)

name: Increment Version on Merge
on:
pull_request:
types: [closed]

jobs:
increment-version:
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' # TODO: verify default branch name

runs-on: ubuntu-latest # Force this to run on github-hosted runner by using a tag that does not exist on self-hosted runners

steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
fetch-depth: 0
# Because this is running only on merged PRs, the default behavior of always checking out the merge commit is correct here.

# See https://github.com/im-open/git-version-lite for more details around how to increment major/minor/patch through commit messages
- name: Increment the version
id: calculate_version
uses: im-open/[email protected]
with:
default-release-type: major # This means if the action cannot find a tag, it will start at v1.0.0

- name: Create version tag on GitHub
uses: actions/github-script@v6
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{ steps.calculate_version.outputs.NEXT_VERSION}}',
sha: context.sha // context.sha is the SHA of the merge commit
})
# Workflow Code: AngryGoose_v15 DO NOT REMOVE
# Purpose:
# Automatically calculates the next semantic version and creates a tag on the repository
# when a PR is merged. The tag is used in later workflows to deploy the tf or db.
#
# Note:
# This workflow should not be used to tag repos that have CI workflows that create their own releases, like
# the dotnet ci build because this workflow would conflict with that. This workflow is recommended for
# things like infrastructure repositories or database projects that do not have a CI build which increments
# their versions.
#
# Frequency:
# This workflow should only be used once per repository
# If the repo has multiple projects that need this workflow (like db and tf), multiple tags can be generated with
# with this workflow by duplicating the increment version step and including different 'tag-prefix' args.
#
# Projects to use this Template with:
# - Azure SQL Database (Core Template)
# - On-Prem Database (Core Template)
# - Storage Account Deployments (Core Template)
# - Terraform (Core Template)

name: Increment Version on Merge
on:
pull_request:
types: [closed]

jobs:
increment-version:
if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main' # TODO: verify default branch name

runs-on: ubuntu-latest # Force this to run on github-hosted runner by using a tag that does not exist on self-hosted runners

steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
# Because this is running only on merged PRs, the default behavior of always checking out the merge commit is correct here.

# See https://github.com/im-open/git-version-lite for more details around how to increment major/minor/patch through commit messages
- name: Increment the version
id: calculate_version
uses: im-open/[email protected]
with:
default-release-type: major # This means if the action cannot find a tag, it will start at v1.0.0

- name: Create version tag on GitHub
uses: actions/github-script@v7
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{ steps.calculate_version.outputs.NEXT_VERSION}}',
sha: context.sha // context.sha is the SHA of the merge commit
})
6 changes: 3 additions & 3 deletions workflow-templates/im-build-npm-package.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Workflow Code: GloomyBadger_v32 DO NOT REMOVE
# Workflow Code: GloomyBadger_v33 DO NOT REMOVE
# Purpose:
# Automatically calculates the next semantic version, runs an npm ci, an npm run tests
# if there is one, an npm publish and then pushes a latest tag for main builds. When the
Expand Down Expand Up @@ -66,11 +66,11 @@ jobs:
working-directory: '' # TODO: Add the path to the npm package project

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ env.REF_TO_BUILD_AND_TAG }}

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16 # TODO: verify node version
registry-url: https://npm.pkg.github.com/
Expand Down
Loading

0 comments on commit 50dd97e

Please sign in to comment.