Skip to content

Commit 8bcc083

Browse files
committed
Try to split into multiple jobs
1 parent 959486c commit 8bcc083

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

‎.github/workflows/build.yml‎

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ on:
1414

1515
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1616
jobs:
17-
# This workflow contains a single job called "build"
17+
1818
build:
19-
# The type of runner that the job will run on
19+
2020
runs-on: ubuntu-latest
2121

22-
# Steps represent a sequence of tasks that will be executed as part of the job
2322
steps:
2423
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2524
- uses: actions/checkout@v4
@@ -55,7 +54,10 @@ jobs:
5554
cache-to: type=gha,mode=max
5655
tags: ${{ steps.meta.outputs.tags }}
5756
labels: ${{ steps.meta.outputs.labels }}
58-
57+
test:
58+
runs-on: ubuntu-latest
59+
needs: build
60+
steps:
5961
# Due to bug https://github.com/docker/buildx/issues/59, need to build for single platform, load, then run tests.
6062
- name: Build a test image single platform and load it
6163
uses: docker/build-push-action@v5
@@ -66,11 +68,13 @@ jobs:
6668
cache-from: type=gha
6769
cache-to: type=gha,mode=max
6870
tags: "mendhak/http-https-echo:testing"
69-
labels: ${{ steps.meta.outputs.labels }}
7071

7172
- name: Run tests using the test image
7273
run: ./tests.sh
73-
74+
scan:
75+
runs-on: ubuntu-latest
76+
needs: build
77+
steps:
7478
- name: Scan the image
7579
id: scan
7680
uses: anchore/scan-action@v3

0 commit comments

Comments
 (0)