Update push-to-main.yml #14
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: push-to-main | |
#a github action that will trigger on push to main or dev branch | |
# will run the build_tracelabsiso_recipe.sh script inside a kali docker container | |
on: | |
push: | |
branches: | |
- main | |
- dev # Added the dev branch here | |
jobs: | |
run-docker: | |
# Specifies that the job runs on a macOS environment | |
runs-on: macos-latest | |
# checkout the code from the repository | |
steps: | |
- uses: actions/checkout@v4 | |
# Sets up Docker environment on macOS runner | |
- name: Install Docker | |
run: | | |
brew install --cask docker | |
ls /Applications/Docker.app/Contents/MacOS | head | |
open -a /Applications/Docker.app --args --unattended --accept-license | |
echo "We are waiting for Docker to be up and running. It can take over 2 minutes..." | |
while ! /Applications/Docker.app/Contents/Resources/bin/docker info &>/dev/null; do sleep 1; done | |
# build docker image | |
- name: build docker image | |
run: | | |
cd $GITHUB_WORKSPACE | |
chmod +x *.sh | |
# use docker to run the build_tracelabsiso_recipe.sh script | |
- name: Run Docker command | |
run: | | |
docker run --rm --interactive --net host --privileged --volume $(pwd):/recipes --workdir /recipes docker.io/humandecoded/tlm1-builder ./build_tracelabsiso_recipe.sh |