Skip to content

Commit

Permalink
Merge pull request #9 from Bandwidth/SWI-5012
Browse files Browse the repository at this point in the history
SWI-5012 - Upgrading action to run on NodeJS 20
  • Loading branch information
jgutierrezglez authored Apr 12, 2024
2 parents 10daefa + 10138b9 commit a213505
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 8 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/release-new-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release new action version

on:
release:
types: [released]
workflow_dispatch:
inputs:
tag-name:
description: 'Tag name that the major tag will point to.'
required: true

env:
TAG_NAME: ${{ github.event.inputs.tag-name || github.event.release.tag_name }}
permissions:
contents: write

jobs:
update-tag:
name: Update the major tag to include the ${{ github.event.inputs.tag-name || github.event.release.tag_name }} changes
runs-on: ${{ fromJSON(vars.SWI_GLORG_PROD_UBUNTU_2204) }}
steps:
- name: Update the ${{ env.TAG_NAME }} tag
uses: actions/publish-action@v0.3.0
with:
source-tag: ${{ env.TAG_NAME }}
15 changes: 10 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
on: [push, pull_request, workflow_dispatch]
on:
workflow_dispatch:
push:
branches:
- main
pull_request:

jobs:
test-success:
runs-on: ubuntu-latest
runs-on: ${{ fromJSON(vars.SWI_GLORG_PROD_UBUNTU_2204) }}
name: Test the action on success
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Success
run: exit 0
Expand All @@ -20,11 +25,11 @@ jobs:
slack-channel: ${{ secrets.SLACK_CHANNEL }}

test-failure:
runs-on: ubuntu-latest
runs-on: ${{ fromJSON(vars.SWI_GLORG_PROD_UBUNTU_2204) }}
name: Test the action on failure
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Failure
run: exit 1
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ See [action.yml](action.yml)

```yaml
steps:
- uses: bandwidth/build-notify-slack-action
- uses: Bandwidth/build-notify-slack-action@v2
with:
job-status: ${{ job.status }}
slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ inputs:
slack-channel:
description: 'Destination channel to send messages'
runs:
using: 'node16'
using: 'node20'
main: 'index.js'
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "build-notify-slack-action",
"version": "1.0.0",
"version": "2.0.0",
"description": "",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit a213505

Please sign in to comment.