Skip to content

Commit

Permalink
Refactor build workflow
Browse files Browse the repository at this point in the history
- Removing `-latest` from the job names.
- Remove redundant item from matrix.
- Add job timeout.
  • Loading branch information
martincostello authored Jan 27, 2025
1 parent 7a9f85c commit cae83af
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ permissions:

jobs:
build:
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
name: ${{ matrix.os-name }}
runs-on: ${{ matrix.runner }}
timeout-minutes: 20

env:
PUBLISH_CONTAINER: ${{ github.event.repository.fork == false && ((github.ref_name == github.event.repository.default_branch) || (github.actor == github.repository_owner)) && matrix.os == 'ubuntu-latest' }}
PUBLISH_CONTAINER: ${{ github.event.repository.fork == false && ((github.ref_name == github.event.repository.default_branch) || (github.actor == github.repository_owner)) && matrix.os-name == 'linux' }}

outputs:
container-tag: ${{ steps.publish-container.outputs.container-tag }}
Expand All @@ -50,12 +51,12 @@ jobs:
fail-fast: false
matrix:
include:
- os: macos-latest
os-name: macos
- os: ubuntu-latest
os-name: linux
- os: windows-latest
os-name: windows
- os-name: macos
runner: macos-latest
- os-name: linux
runner: ubuntu-latest
- os-name: windows
runner: windows-latest

steps:

Expand Down

0 comments on commit cae83af

Please sign in to comment.