Skip to content

Commit

Permalink
Merge pull request #1737 from salesforcecli/update-gha
Browse files Browse the repository at this point in the history
Update GHA actions
  • Loading branch information
shetzel authored Jun 13, 2024
2 parents 1d68322 + e64ba12 commit af2b318
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 26 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-docker-full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ jobs:
node-version: ${{ vars.NODE_VERSION_OVERRIDE || 'lts/*' }}

- name: Log in to Docker Hub
uses: docker/login-action@40891eba8c2bcd1309b07ba8b11232f313e86779
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
with:
images: salesforce/cli

Expand All @@ -49,7 +49,7 @@ jobs:
echo "sha=$SHA" >> "$GITHUB_OUTPUT"
- name: Build and push Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25
with:
context: .
push: true
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-docker-slim.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@ jobs:
npmPackage: '@salesforce/cli'

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb

- name: Log in to Docker Hub
uses: docker/login-action@40891eba8c2bcd1309b07ba8b11232f313e86779
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
with:
images: salesforce/cli

- name: Build and push Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25
with:
context: .
push: true
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/create-cli-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@ jobs:
steps:
- name: Get release channel Github release
id: release-channel
uses: actions-ecosystem/action-regex-match@d50fd2e7a37d0e617aea3d7ada663bd56862b9cc
uses: kaisugi/action-regex-match@45cc5bacf016a4c0d2c3c9d0f8b7c2f1b79687b8
with:
text: ${{ github.event.release.body }}
# https://regex101.com/r/tYAJ8L/1
regex: '!! Release as ([a-z-]+) !!'

- name: Confirm regex channel match
if: ${{ !steps.release-channel.outputs.group1 }}
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Release channel was not found in release body. Exiting')
- name: Prevent legacy channel
if: ${{ steps.release-channel.outputs.group1 == 'legacy' }}
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Do not publish to the "legacy" channel! It is still bundled with "sfdx@v7", which is permanetly archived.')
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:
- build-docker-full
steps:
- name: Announce patch in Slack
uses: slackapi/slack-github-action@v1.24.0
uses: slackapi/slack-github-action@v1.26.0
env:
SLACK_WEBHOOK_URL: ${{ secrets.PLATFORM_CLI_CHANNEL_SLACK_INCOMING_WEBHOOK }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/create-github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
steps:
- name: Get release channel from PR title
id: release-channel
uses: actions-ecosystem/action-regex-match@d50fd2e7a37d0e617aea3d7ada663bd56862b9cc
uses: kaisugi/action-regex-match@45cc5bacf016a4c0d2c3c9d0f8b7c2f1b79687b8
with:
text: ${{ github.event.pull_request.title }}
# https://regex101.com/r/66VrAs/1
Expand All @@ -30,14 +30,14 @@ jobs:
# Exit the build if no channel is found
- name: Confirm regex channel match
if: ${{ !steps.release-channel.outputs.group1 }}
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Release channel was not found in PR title. Exiting')
- name: Prevent legacy channel
if: ${{ steps.release-channel.outputs.group1 == 'legacy' }}
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Do not publish to the "legacy" channel! It is still bundled with "sfdx@v7", which is permanetly archived.')
Expand All @@ -56,7 +56,7 @@ jobs:
# Package.json "alpha" tag must match PR title channel
- name: Validate prerelease tag
if: ${{ !contains(fromJSON('["latest", "latest-rc", "nightly"]'), steps.release-channel.outputs.group1) && (!steps.check-prerelease.outputs.tag || steps.check-prerelease.outputs.tag != steps.release-channel.outputs.group1) }}
uses: actions/github-script@v3
uses: actions/github-script@v7
with:
script: |
core.setFailed('Prerelease requires a dist tag name in your package.json like beta in 1.1.1-beta.0')
Expand All @@ -75,13 +75,13 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v4
- uses: notiz-dev/github-action-json-property@7a701887f4b568b23eb7b78bb0fc49aaeb1b68d3
- uses: salesforcecli/github-workflows/.github/actions/get-json-property@main
id: packageVersion
with:
path: 'package.json'
prop_path: 'version'
- name: Create Github Release
uses: ncipollo/release-action@6c75be85e571768fa31b40abf38de58ba0397db5
uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5
with:
name: ${{ steps.packageVersion.outputs.prop }}
tag: ${{ steps.packageVersion.outputs.prop }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/get-signed-from-stampy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
node scripts/stampy-signed-delete.js
- name: notify
uses: slackapi/slack-github-action@v1.24.0
uses: slackapi/slack-github-action@v1.26.0
env:
SLACK_WEBHOOK_URL: ${{ secrets.CLI_TEAM_SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/make-pr-for-nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ jobs:
npmPackage: '@salesforce/cli'

- name: Parse latest-rc semver
uses: booxmedialtd/ws-action-parse-semver@7784200024d6b3fc01253e617ec0168daf603de3
uses: salesforcecli/github-workflows/.github/actions/parse-semver@main
id: latest-rc-semver-info
with:
input_string: ${{ steps.latest-rc-version.outputs.version }}

- name: Look up sf package.json version
uses: notiz-dev/github-action-json-property@7a701887f4b568b23eb7b78bb0fc49aaeb1b68d3
uses: salesforcecli/github-workflows/.github/actions/get-json-property@main
id: package-json-version
with:
path: 'package.json'
prop_path: 'version'

- name: Parse package.json semver
uses: booxmedialtd/ws-action-parse-semver@7784200024d6b3fc01253e617ec0168daf603de3
uses: salesforcecli/github-workflows/.github/actions/parse-semver@main
id: package-json-semver-info
with:
input_string: ${{ steps.package-json-version.outputs.prop }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/promote-nightly-to-rc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ jobs:
- name: Announce promotion
id: slack
uses: slackapi/slack-github-action@v1.24.0
uses: slackapi/slack-github-action@v1.26.0
env:
SLACK_WEBHOOK_URL: ${{ secrets.PLATFORM_CLI_CHANNEL_SLACK_INCOMING_WEBHOOK }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/promote-rc-to-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Announce promotion
id: slack
uses: slackapi/slack-github-action@v1.24.0
uses: slackapi/slack-github-action@v1.26.0
env:
SLACK_WEBHOOK_URL: ${{ secrets.PLATFORM_CLI_CHANNEL_SLACK_INCOMING_WEBHOOK }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/promote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ jobs:
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb

- name: Log in to Docker Hub
uses: docker/login-action@40891eba8c2bcd1309b07ba8b11232f313e86779
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/workflow-failure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
steps:
- name: Announce Failure
id: slack
uses: slackapi/slack-github-action@v1.24.0
uses: slackapi/slack-github-action@v1.26.0
env:
SLACK_WEBHOOK_URL: ${{ secrets.CLI_ALERTS_SLACK_WEBHOOK }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
Expand Down

0 comments on commit af2b318

Please sign in to comment.