Ngen update #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and push ngen image | |
on: | |
pull_request: | |
branches: [ main, notreal ] | |
paths: | |
- 'docker/**' | |
workflow_dispatch: | |
jobs: | |
changes: | |
runs-on: self-hosted | |
outputs: | |
deps: ${{ steps.changes.outputs.deps }} | |
ngen: ${{ steps.changes.outputs.ngen }} | |
troute: ${{ steps.changes.outputs.troute }} | |
ngiab: ${{ steps.changes.outputs.ngiab }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dorny/paths-filter@v2 | |
id: changes | |
with: | |
filters: | | |
deps: | |
- 'docker/Dockerfile.ngen-deps' | |
ngen: | |
- 'docker/Dockerfile.ngen' | |
troute: | |
- 'docker/Dockerfile.t-route' | |
ngiab: | |
- 'docker/Dockerfile' | |
deps: | |
#if the ngen-deps dockerfile changes, test its build | |
needs: changes | |
if: ${{ needs.changes.outputs.deps == 'true' }} | |
runs-on: self-hosted | |
# For pull requests, it's not necessary to checkout code | |
permissions: | |
pull-requests: read | |
steps: | |
- name: Build ngen-deps Docker image | |
uses: ./.github/action_templates/build | |
with: | |
image-name: "deps" | |
dockerfile-name: "Dockerfile.ngen-deps" | |
ngen: | |
#if ngen or ngen-deps dockerfile has changed, test the ngen build | |
needs: changes | |
if: ${{ needs.changes.outputs.ngen == 'true' || needs.changes.outputs.deps == 'true' }} | |
runs-on: self-hosted | |
# For pull requests, it's not necessary to checkout code | |
permissions: | |
pull-requests: read | |
steps: | |
- name: Build ngen Docker image | |
uses: ./.github/action_templates/build | |
with: | |
image-name: "ngen" | |
dockerfile-name: "Dockerfile.ngen" | |
troute: | |
#if troute dockerfile or the ngen-deps file has changed, test the troute build | |
needs: changes | |
if: ${{ needs.changes.outputs.troute == 'true' || needs.changes.outputs.deps == 'true' }} | |
runs-on: self-hosted | |
# For pull requests, it's not necessary to checkout code | |
permissions: | |
pull-requests: read | |
steps: | |
- name: Build troute Docker image | |
uses: ./.github/action_templates/build | |
with: | |
image-name: "troute" | |
dockerfile-name: "Dockerfile.t-route" | |
ngiab: | |
#if any of the other docker files have changed, test the ngiab build as well | |
needs: changes | |
if: | | |
needs.changes.outputs.ngiab == 'true' || needs.changes.outputs.ngen == 'true' || | |
needs.changes.outputs.deps == 'true' || needs.changes.outputs.troute == 'true' | |
runs-on: self-hosted | |
# For pull requests, it's not necessary to checkout code | |
permissions: | |
pull-requests: read | |
steps: | |
- name: Build ngiab Docker image | |
uses: ./.github/action_templates/build | |
with: | |
image-name: "ngiab" | |
dockerfile-name: "Dockerfile.ngiab" |