github-actions: add to run the job every day #8
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: Install and Run Engine Stressor | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
schedule: | |
- cron: '0 3 * * *' # This sets the workflow to run daily at midnight UTC | |
jobs: | |
install-and-run: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install dependencies | |
run: sudo apt-get update && sudo apt-get install -y make containernetworking-plugins | |
- name: Run make install | |
run: sudo make install | |
- name: Pull Docker image | |
run: docker pull quay.io/centos-sig-automotive/automotive-osbuild | |
- name: Run engine stressor | |
run: | | |
sudo TOTAL_MEMORY_FOR_THE_NAMESPACE="1G" \ | |
LIST_CURRENT_STATE=true \ | |
VERBOSE=true \ | |
CLEANUP=false \ | |
TIMEOUT_PODMAN_STOP_CONTAINER=5 \ | |
NETWORK_NAME="my-network" \ | |
VOLUME_NAME="my-volume" \ | |
IMAGE_NAME="quay.io/centos-sig-automotive/automotive-osbuild" \ | |
IMAGE_COMMAND="sleep 3600" \ | |
NUMBER_OF_CONTAINERS="100" \ | |
./engine-stressor |