From 5f9a5f51c9a2749c441fd1e6d0f84f98bb2c5ec2 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Tue, 1 Jun 2021 14:14:22 +0300 Subject: [PATCH] Clone wiki only for steps which need it --- .github/workflows/docker.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 594066a2..84319642 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -33,11 +33,6 @@ jobs: uses: actions/checkout@v2 with: path: main - - name: Clone Wiki - uses: actions/checkout@v2 - with: - repository: ${{github.repository}}.wiki - path: wiki - name: Set Up Python uses: actions/setup-python@v2 with: @@ -51,8 +46,20 @@ jobs: 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' + # Pass GITHUB_REPOSITORY directly to avoid conflict with GitHub Actions built-in env var + run: make -C main git-commit GITHUB_REPOSITORY='${{github.repository}}.wiki' + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + LOCAL_PATH: ../wiki - name: Login to Docker Hub if: github.ref == 'refs/heads/master' run: > @@ -61,10 +68,3 @@ jobs: - name: Push Images to DockerHub if: github.ref == 'refs/heads/master' run: make -C main push-all - - name: Push Wiki to GitHub - if: github.ref == 'refs/heads/master' - # Pass GITHUB_REPOSITORY directly to avoid conflict with GitHub Actions built-in env var - run: make -C main git-commit GITHUB_REPOSITORY='${{github.repository}}.wiki' - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - LOCAL_PATH: ../wiki