Skip to content

Commit

Permalink
Add GitHub Action YML for verifying workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
yoland68 committed May 17, 2024
1 parent ea9e9a9 commit da17698
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .github/workflows/verify-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Verify GitHub Action YML

on:
push:
paths:
- '.github/workflows/*.yml'
pull_request:
paths:
- '.github/workflows/*.yml'

jobs:
lint:
name: Lint YAML files
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install actionlint
run: |
curl -sSfL https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash | bash
sudo mv actionlint /usr/local/bin/
- name: Lint GitHub Actions workflows
run: |
actionlint
8 changes: 7 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -405,9 +405,15 @@ runs:
path: ${{ github.workspace }}/application.log

- name: Sleep for 10 minutes on failure
if: failure()
if: ${{ inputs.os != 'windows' && failure() }}
shell: "bash"
run: sleep 600

- name: Sleep for 10 minutes on failure
if: ${{ inputs.os == 'windows' && failure() }}
shell: powershell
run: Start-Sleep -Seconds 600

## Mac/Linux Cleanup Steps
- name: Cleanup
if: ${{ inputs.os != 'windows' && ( success() || failure() ) }}
Expand Down

0 comments on commit da17698

Please sign in to comment.