Skip to content

Commit

Permalink
Additional workflows tidying
Browse files Browse the repository at this point in the history
  • Loading branch information
jgarber623-cargosense committed Feb 28, 2024
1 parent cc83fa1 commit 857ea55
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 18 deletions.
22 changes: 12 additions & 10 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,20 @@ on:
workflow_dispatch:

jobs:
lint-shell-scripts:
lint:
name: Lint shell scripts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: azohra/shell-linter@latest
with:
path: "./src/**/*.sh"
severity: "warning"
env:
# Acceptable use of decimal comparison
SHELLCHECK_OPTS: -e SC2072
validate-feature-json:
- uses: actions/checkout@v4
- uses: azohra/shell-linter@latest
with:
path: "./src/**/*.sh"
severity: "warning"
env:
# Acceptable use of decimal comparison
SHELLCHECK_OPTS: -e SC2072
validate:
name: Validate devcontainer-feature.json files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,21 @@ on:

jobs:
lint:
name: Lint
uses: "./.github/workflows/lint.yml"
test:
name: Test
uses: "./.github/workflows/test.yml"
publish-to-github-packages:
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
name: Publish to GitHub Packages
permissions:
contents: read
packages: write
needs:
- lint
- test
if: ${{ github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: devcontainers/action@v1
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,27 @@ jobs:
test-autogenerated:
name: Feature ${{ matrix.features }} » ${{ matrix.baseImage }}
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
features:
- color
- hello
- actionlint
baseImage:
- debian:latest
- ubuntu:latest
- mcr.microsoft.com/devcontainers/base:ubuntu
continue-on-error: true
steps:
- uses: actions/checkout@v4
- run: npm install -g @devcontainers/cli
- run: devcontainer features test -f ${{ matrix.features }} -i ${{ matrix.baseImage }} --skip-scenarios .
test-scenarios:
name: Feature ${{ matrix.features }}
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
features:
- color
- hello
- actionlint
continue-on-error: true
steps:
- uses: actions/checkout@v4
- run: npm install -g @devcontainers/cli
Expand Down

0 comments on commit 857ea55

Please sign in to comment.