From 134526baa9690397a092db6c9d6e9962e4606b1b Mon Sep 17 00:00:00 2001 From: chiefmikey Date: Mon, 22 Aug 2022 15:38:29 -0600 Subject: [PATCH 1/2] Update prune beta to branch -a --- .github/workflows/prune-beta.yml | 3 ++- beta/beta-branch.yml | 4 ++-- beta/beta-compile.yml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/prune-beta.yml b/.github/workflows/prune-beta.yml index 7fc94a89..8ede9970 100644 --- a/.github/workflows/prune-beta.yml +++ b/.github/workflows/prune-beta.yml @@ -43,8 +43,9 @@ jobs: env: MERGED_BRANCHES: ${{ steps.checkout-beta.outputs.merged_branches }} run: | + echo test-ref: $(git status) BRANCH=${{ github.head_ref }} - BRANCHES=$(git branch) + BRANCHES=$(git branch -a) echo test merged: ${MERGED_BRANCHES} echo test branch: ${BRANCH} echo test branches: ${BRANCHES} diff --git a/beta/beta-branch.yml b/beta/beta-branch.yml index 719e918c..d97b84d9 100644 --- a/beta/beta-branch.yml +++ b/beta/beta-branch.yml @@ -32,6 +32,6 @@ jobs: git merge --allow-unrelated-histories origin/main || true git checkout --ours . git add . - git commit -am 'Merge ${BRANCH} with main' + git commit -am "Merge ${BRANCH} with Main" git push -fu origin ${BRANCH} - gh pr create --title ${BRANCH} --body 'Beta branch' --base main --head ${BRANCH} + gh pr create --title "${BRANCH}" --body "https://github.com/chiefmikey/gitlang/tree/${BRANCH}" --base main --head ${BRANCH} diff --git a/beta/beta-compile.yml b/beta/beta-compile.yml index 8a5f44cb..f2ea577c 100644 --- a/beta/beta-compile.yml +++ b/beta/beta-compile.yml @@ -33,7 +33,7 @@ jobs: echo test: $(gh pr list -R chiefmikey/gitlang-beta -s open --json headRefName | jq -r '.[] | .headRefName') for branch in $(gh pr list -s open --json headRefName | jq -r '.[] | .headRefName'); do git fetch upstream ${branch} - git merge --allow-unrelated-histories ${branch} || true + git merge --allow-unrelated-histories upstream/${branch} || true done - name: Push to Main From 8acdd3fa1b1558633b7616e2bef6e4eed7dc6121 Mon Sep 17 00:00:00 2001 From: chiefmikey Date: Mon, 22 Aug 2022 15:42:27 -0600 Subject: [PATCH 2/2] Beta compile git add --- .github/workflows/build-beta.yml | 6 +++--- beta/beta-compile.yml | 1 + beta/{beta-branch.yml => beta-pr.yml} | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) rename beta/{beta-branch.yml => beta-pr.yml} (97%) diff --git a/.github/workflows/build-beta.yml b/.github/workflows/build-beta.yml index 1d7dab71..f79c5c73 100644 --- a/.github/workflows/build-beta.yml +++ b/.github/workflows/build-beta.yml @@ -36,8 +36,10 @@ jobs: run : | rm -rf docs/index.html docs/404.html docs/CNAME .github mkdir .github .github/workflows - mv beta/beta-compile.yml beta/beta-branch.yml .github/workflows/ + mv beta/beta-compile.yml beta/beta-pr.yml .github/workflows/ mv beta/index.html beta/404.html beta/CNAME docs/ + git add . + git commit -am 'Beta Files' - name: Push Beta run: | @@ -45,8 +47,6 @@ jobs: git config user.name "chiefmikey" git config user.email "wolfemikl@gmail.com" git remote set-url --add --push origin https://github.com/chiefmikey/gitlang-beta.git - git add . - git commit -am 'Beta Files' git reset $(git commit-tree HEAD^{tree} -m 'Beta Branch') git push -fu origin HEAD:refs/heads/${BRANCH} echo "https://beta.gitlang.net" diff --git a/beta/beta-compile.yml b/beta/beta-compile.yml index f2ea577c..6cfbe48d 100644 --- a/beta/beta-compile.yml +++ b/beta/beta-compile.yml @@ -34,6 +34,7 @@ jobs: for branch in $(gh pr list -s open --json headRefName | jq -r '.[] | .headRefName'); do git fetch upstream ${branch} git merge --allow-unrelated-histories upstream/${branch} || true + git add . done - name: Push to Main diff --git a/beta/beta-branch.yml b/beta/beta-pr.yml similarity index 97% rename from beta/beta-branch.yml rename to beta/beta-pr.yml index d97b84d9..a2bef5b9 100644 --- a/beta/beta-branch.yml +++ b/beta/beta-pr.yml @@ -1,4 +1,4 @@ -name: '${GITHUB_REF##*/}' +name: 'Beta Pull Request' on: create