RAUDI #1031
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
# Custom Workflow | |
name: RAUDI | |
# Controls when the workflow will run | |
on: | |
# Run every night at midnight | |
schedule: | |
- cron: "0 0 * * *" | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "raudi" | |
raudi: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
# Setup python | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' # Version range or exact version of a Python version to use | |
# Install dependencies | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r $PWD/requirements.txt | |
# Setup Docker | |
- name: Setup Docker | |
uses: docker/setup-buildx-action@v2 | |
# Login Docker | |
- name: Login Docker | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_USER }} | |
password: ${{ secrets.DOCKER_API_TOKEN }} | |
# Setup QEMU | |
- | |
name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
# Run | |
- name: Run my script | |
env: | |
RAUDI_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
RAUDI_GITHUB_ACTION: True | |
RAUDI_DOCKER_BUILD_PROGRESS: True | |
run: | | |
python $PWD/raudi.py --all --push --remote 2>&1 | tee /tmp/log.txt | |
chmod +x $PWD/.github/workflows/autocommit.sh && $PWD/.github/workflows/autocommit.sh | |
- name: Get current date | |
id: date | |
run: echo "::set-output name=date::$(date +'%Y-%m-%d')" | |
- name: Auto Commit | |
id: "auto-commit-action" | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_user_name: cybersecsi | |
commit_user_email: [email protected] | |
commit_author: cybersecsi <[email protected]> | |
commit_message: Automatic Update Docker Images (${{ steps.date.outputs.date }}) |