From 32d1dae2963e1b2526a9bf36f4a55430c21af680 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Fri, 16 Jul 2021 16:57:09 +0300 Subject: [PATCH] Make GitHub Workflows steps look beatiful (#1404) Co-authored-by: Erik Sundell --- .github/workflows/docker.yml | 9 +++++++++ .github/workflows/pre-commit.yml | 4 ++++ .github/workflows/sphinx.yml | 6 ++++++ 3 files changed, 19 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 1a6d9d19db..d490a6f4bd 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -30,43 +30,52 @@ jobs: if: > !contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.pull_request.title, 'ci skip') + steps: - name: Clone Main Repo uses: actions/checkout@v2 with: path: main + - name: Set Up Python uses: actions/setup-python@v2 with: python-version: 3.x + - name: Install Dev Dependencies run: | python -m pip install --upgrade pip make -C main dev-env + - name: Build Docker Images run: make -C main build-test-all env: # Full logs for CI build BUILDKIT_PROGRESS: plain + - name: Clone Wiki uses: actions/checkout@v2 with: repository: ${{github.repository}}.wiki path: wiki + - name: Run Post-Build Hooks run: make -C main hook-all + - name: Push Wiki to GitHub if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' uses: stefanzweifel/git-auto-commit-action@5dd17c3b53a58c1cb5eaab903826abe94765ccd6 # dependabot updates to latest release with: commit_message: "[ci skip] Automated publish for ${{github.sha}}" repository: wiki/ + - name: Login to Docker Hub if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 # dependabot updates to latest release with: username: ${{secrets.DOCKERHUB_USERNAME}} password: ${{secrets.DOCKERHUB_TOKEN}} + - name: Push Images to DockerHub if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' run: make -C main push-all diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 8da1c5bdc5..f49461b333 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -14,18 +14,22 @@ jobs: if: > !contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.pull_request.title, 'ci skip') + steps: - name: Clone Main Repo uses: actions/checkout@v2 with: path: main + - name: Set Up Python uses: actions/setup-python@v2 with: python-version: 3.x + - name: Install pre-commit run: | python -m pip install --upgrade pip python -m pip install --upgrade pre-commit + - name: Run pre-commit hooks run: make -C main pre-commit-all diff --git a/.github/workflows/sphinx.yml b/.github/workflows/sphinx.yml index 7a008728ee..77e2756c87 100644 --- a/.github/workflows/sphinx.yml +++ b/.github/workflows/sphinx.yml @@ -22,24 +22,30 @@ jobs: if: > !contains(github.event.head_commit.message , 'ci skip') && !contains(github.event.pull_request.title, 'ci skip') + steps: - name: Checkout Repo uses: actions/checkout@v2 + - name: Set Up Python uses: actions/setup-python@v2 with: python-version: 3.x + - name: Install Dev Dependencies run: | python -m pip install --upgrade pip make dev-env + - name: Build Documentation run: make docs + - name: Extract Source Strings working-directory: docs run: | sphinx-build -M gettext ./ ./_build/ sphinx-intl update -p ./_build/gettext -l en + - name: Push Strings to Master if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' uses: stefanzweifel/git-auto-commit-action@5dd17c3b53a58c1cb5eaab903826abe94765ccd6 # dependabot updates to latest release