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/.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-compile.yml b/beta/beta-compile.yml index 8a5f44cb..6cfbe48d 100644 --- a/beta/beta-compile.yml +++ b/beta/beta-compile.yml @@ -33,7 +33,8 @@ 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 + git add . done - name: Push to Main diff --git a/beta/beta-branch.yml b/beta/beta-pr.yml similarity index 78% rename from beta/beta-branch.yml rename to beta/beta-pr.yml index 719e918c..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 @@ -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}