Re: https://github.com/OpenHistoricalMap/issues/issues/885, tweaks. #13
Workflow file for this run
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
name: OHM Upstream Sync | ||
on: | ||
push: | ||
branches: 885-ci-for-tasking-manager | ||
# schedule: | ||
# - cron: '34 12 * * *' | ||
workflow_dispatch: | ||
jobs: | ||
upstream-sync: | ||
name: Upstream Sync | ||
permissions: | ||
contents: write | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- name: Check out our repository | ||
uses: actions/checkout@v4 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
fetch-depth: 0 | ||
- name: List relevant branches & script directories | ||
run: | | ||
git branch --all | egrep '\/main$|\/master$|sacrifice|candidate' | ||
ls -lR ./scripts/ohm | ||
- name: Delete previous sacrificial branch | ||
run: | | ||
if git show-ref --quiet refs/heads/the-sacrifice; then | ||
git branch --remote -D origin/the-sacrifice | ||
fi | ||
- name: List relevant branches & script directories | ||
run: | | ||
git branch --all | egrep '\/main$|\/master$|sacrifice|candidate' | ||
ls -lR ./scripts/ohm | ||
- name: Check out upstream master | ||
env: | ||
UPSTREAM: https://github.com/hotosm/tasking-manager | ||
run: | | ||
git config --global user.name 'github-actions' | ||
git config --global user.email '[email protected]' | ||
git remote add upstream "${UPSTREAM}" | ||
git fetch upstream master | ||
- name: Check out our repository | ||
uses: actions/checkout@v4 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
fetch-depth: 0 | ||
ref: '885-ci-for-tasking-manager' | ||
- name: List relevant branches & script directories | ||
run: | | ||
git branch --all | egrep '\/main$|\/master$|sacrifice|candidate' | ||
ls -lR ./scripts/ohm | ||
- name: Create 'the-sacrifice', our new sacrificial branch | ||
uses: peterjgrainger/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
branch: 'the-sacrifice' | ||
sha: ${{ GITHUB_SHA }} | ||
Check failure on line 71 in .github/workflows/ohm.upstream-sync.yml GitHub Actions / OHM Upstream SyncInvalid workflow file
|
||
- name: Check out our new sacrificial branch | ||
uses: actions/checkout@v4 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
fetch-depth: 0 | ||
ref: 'the-sacrifice' | ||
- name: List relevant branches & script directories | ||
run: | | ||
git branch --all | egrep '\/main$|\/master$|sacrifice|candidate' | ||
ls -lR ./scripts/ohm | ||
- name: Make our scripts executable | ||
run: chmod +x ./scripts/ohm/*.sh | ||
- name: Preserve upstream docs | ||
run: ./scripts/ohm/preserve_upstream_docs.sh | ||
# - name: Start the merge | ||
# run: | | ||
# git merge --no-ff --no-commit upstream/master | ||
# git status | ||
# - name: Continue the merge where there are no concerns | ||
# run: ./scripts/upstream_sync.sh | ||
# | ||
# - name: Push updates | ||
# run: | | ||
# git push release-candidate |