-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rewrite logic to use lewagon/wait-on-check-action instead
- Loading branch information
Showing
3 changed files
with
27 additions
and
21 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,6 @@ name: LAPIS-SILO | |
on: | ||
push: | ||
|
||
permissions: | ||
contents: read | ||
actions: write | ||
|
||
concurrency: | ||
group: ci-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
@@ -16,20 +12,27 @@ env: | |
DOCKER_IMAGE_NAME: ghcr.io/genspectrum/lapis-silo | ||
|
||
jobs: | ||
waitForDependencyImage: | ||
name: Wait for dependency image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Wait | ||
uses: lewagon/[email protected] | ||
with: | ||
ref: ${{ github.ref }} | ||
check-name: 'Build Docker Image Dependencies' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
wait-interval: 3 | ||
|
||
dockerImageUnitTests: | ||
name: Build Docker Image and Run Unit Tests | ||
runs-on: ubuntu-latest | ||
needs: waitForDependencyImage | ||
permissions: | ||
packages: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Generate dependency files hash | ||
id: files-hash | ||
run: | | ||
DIR_HASH=$(echo -n ${{ hashFiles('conanfile.py', 'conanprofile.docker', '.github/workflows/ci.yml', './Dockerfile_dependencies') }}) | ||
echo "DIR_HASH=$DIR_HASH" >> $GITHUB_ENV | ||
- name: Docker metadata | ||
id: dockerMetadata | ||
uses: docker/metadata-action@v5 | ||
|
@@ -60,7 +63,7 @@ jobs: | |
cache-from: type=gha,ref=${{ github.ref_name }}-image-cache | ||
cache-to: type=gha,mode=min,ref=${{ github.ref_name }}-image-cache | ||
build-args: | | ||
DEPENDENCY_IMAGE=ghcr.io/genspectrum/lapis-silo-dependencies:${{ env.DIR_HASH }} | ||
DEPENDENCY_IMAGE=${{ env.DOCKER_DEPENDENCY_IMAGE_NAME }}:commit-${{ github.sha }} | ||
- name: Run tests | ||
uses: addnab/docker-run-action@v3 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,6 @@ name: Run Linter | |
|
||
on: | ||
pull_request: | ||
workflow_run: | ||
workflows: [ "First Workflow" ] | ||
types: | ||
- completed | ||
|
||
concurrency: | ||
group: linter-${{ github.ref }} | ||
|
@@ -15,11 +11,22 @@ env: | |
DOCKER_DEPENDENCY_IMAGE_NAME: ghcr.io/genspectrum/lapis-silo-dependencies | ||
|
||
jobs: | ||
waitForDependencyImage: | ||
name: Wait for dependency image | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Wait | ||
uses: lewagon/[email protected] | ||
with: | ||
ref: ${{ github.ref }} | ||
check-name: 'Build Docker Image Dependencies' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
wait-interval: 3 | ||
|
||
linter: | ||
name: Build And Run linter | ||
needs: linterDependencies | ||
needs: waitForDependencyImage | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event_name == 'pull_request' }} | ||
env: | ||
PR_NUMBER: ${{ github.event.number }} | ||
container: | ||
|