Make github actions work for main branch

This commit is contained in:
Ayaz Salikhov
2021-06-20 19:52:10 +03:00
parent e202749199
commit c650161aa5
2 changed files with 5 additions and 5 deletions

View File

@@ -56,18 +56,18 @@ jobs:
- name: Run Post-Build Hooks - name: Run Post-Build Hooks
run: make -C main hook-all run: make -C main hook-all
- name: Push Wiki to GitHub - name: Push Wiki to GitHub
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master' || 'refs/heads/main'
# Pass GITHUB_REPOSITORY directly to avoid conflict with GitHub Actions built-in env var # 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' run: make -C main git-commit GITHUB_REPOSITORY='${{github.repository}}.wiki'
env: env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
LOCAL_PATH: ../wiki LOCAL_PATH: ../wiki
- name: Login to Docker Hub - name: Login to Docker Hub
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master' || 'refs/heads/main'
uses: docker/login-action@v1 uses: docker/login-action@v1
with: with:
username: ${{secrets.DOCKERHUB_USERNAME}} username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_TOKEN}} password: ${{secrets.DOCKERHUB_TOKEN}}
- name: Push Images to DockerHub - name: Push Images to DockerHub
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master' || 'refs/heads/main'
run: make -C main push-all run: make -C main push-all

View File

@@ -35,13 +35,13 @@ jobs:
- name: Build Documentation - name: Build Documentation
run: make docs run: make docs
- name: Extract Source Strings - name: Extract Source Strings
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master' || 'refs/heads/main'
working-directory: docs working-directory: docs
run: | run: |
make gettext make gettext
sphinx-intl update -p _build/gettext -l en sphinx-intl update -p _build/gettext -l en
- name: Push Strings to Master - name: Push Strings to Master
if: github.ref == 'refs/heads/master' if: github.ref == 'refs/heads/master' || 'refs/heads/main'
run: make git-commit run: make git-commit
env: env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}