Skip to content

Commit

Permalink
Add Docker image for running GitHub Actions locally using ACT
Browse files Browse the repository at this point in the history
  • Loading branch information
samuell committed Jan 26, 2024
1 parent f13e238 commit a00b420
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ci/act-nextflow-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Docker image to be used for running CI locally using ACT
FROM ghcr.io/catthehacker/ubuntu:act-latest

# Install java
RUN apt-get update && sudo apt-get install -y openjdk-21-jre
1 change: 1 addition & 0 deletions ci/act-nextflow-image/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker build -t genomicmedicinesweden/act-nextflow:latest .
1 change: 1 addition & 0 deletions ci/act-nextflow-image/push.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker push genomicmedicinesweden/act-nextflow:latest
6 changes: 4 additions & 2 deletions scripts/runci.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
#!/bin/bash
# This script uses the act tool to execute GitHub Actions workflows locally
# for increased iteration speed.
# It requires that you have Docker installed.
# It requires the act [1] binary to be available in your path.
# It also requires a late version of the GitHub commandline client (`gh`) [2]
# to be installed and available on your path.
# [1] https://github.com/nektos/act
# [2] https://github.com/cli/cli
act -v \
# Note: You can add the -v option to get more output, for troubleshooting.
act \
-s GITHUB_TOKEN="$(gh auth token)" \
-e event.json \
-P ubuntu-latest=catthehacker/ubuntu:act-latest \
-P ubuntu-latest=genomicmedicinesweden/act-nextflow:latest \
-W .github/workflows/ci.yml \
|& tee ci-output-$(date +%Y%m%d.%H%M%S).log

0 comments on commit a00b420

Please sign in to comment.