mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-17 15:02:57 +00:00
Use stefanzweifel/git-auto-commit-action to push to github
This commit is contained in:
9
.github/workflows/docker.yml
vendored
9
.github/workflows/docker.yml
vendored
@@ -57,11 +57,10 @@ jobs:
|
||||
run: make -C main hook-all
|
||||
- name: Push Wiki to GitHub
|
||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
|
||||
# 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
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
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@v1
|
||||
|
8
.github/workflows/sphinx.yml
vendored
8
.github/workflows/sphinx.yml
vendored
@@ -42,8 +42,6 @@ jobs:
|
||||
sphinx-intl update -p ./_build/gettext -l en
|
||||
- name: Push Strings to Master
|
||||
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main'
|
||||
run: make git-commit
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
GITHUB_REPOSITORY: ${{github.repository}}
|
||||
LOCAL_PATH: ./docs/locale/en
|
||||
uses: stefanzweifel/git-auto-commit-action@v4
|
||||
with:
|
||||
commit_message: "[ci skip] Automated publish for ${{ GITHUB_SHA }}"
|
||||
|
16
Makefile
16
Makefile
@@ -62,22 +62,6 @@ dev-env: ## install libraries required to build docs and run tests
|
||||
docs: ## build HTML documentation
|
||||
sphinx-build docs/ docs/_build/
|
||||
|
||||
git-commit: LOCAL_PATH?=.
|
||||
git-commit: GITHUB_SHA?=$(shell git rev-parse HEAD)
|
||||
git-commit: GITHUB_REPOSITORY?=jupyter/docker-stacks
|
||||
git-commit: GITHUB_TOKEN?=
|
||||
git-commit: ## commit outstading git changes and push to remote
|
||||
@git config --global user.name "GitHub Actions"
|
||||
@git config --global user.email "actions@users.noreply.github.com"
|
||||
|
||||
@echo "Publishing outstanding changes in $(LOCAL_PATH) to $(GITHUB_REPOSITORY)"
|
||||
@cd $(LOCAL_PATH) && \
|
||||
git remote add publisher https://$(GITHUB_TOKEN)@github.com/$(GITHUB_REPOSITORY).git && \
|
||||
git checkout master && \
|
||||
git add -A -- . && \
|
||||
git commit -m "[ci skip] Automated publish for $(GITHUB_SHA)" || exit 0
|
||||
@cd $(LOCAL_PATH) && git push -u publisher master
|
||||
|
||||
hook/%: WIKI_PATH?=../wiki
|
||||
hook/%: ## run post-build hooks for an image
|
||||
python3 -m tagging.tag_image --short-image-name "$(notdir $@)" --owner "$(OWNER)" && \
|
||||
|
Reference in New Issue
Block a user