Skip to content

Commit

Permalink
update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
eq19 committed Nov 25, 2024
1 parent c5209c6 commit aa4aa6a
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 24 deletions.
2 changes: 2 additions & 0 deletions .github/actions/3-exponentiation/4-parser/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ runs:
env:
JOB_ID: ${{ inputs.id }}
GH_TOKEN: ${{ inputs.token }}
BASE: "https://github.com/eq19/eq19.github.io.wiki.git"
WIKI: "https://github.com/${{ env.TARGET_REPOSITORY }}.wiki.git"
run: |
if [ -d /mnt/disks/platform/usr/local/sbin ]; then
export PAULI_SUM=$(echo -n "${{ inputs.pauli_sum }}" | base64 --decode);
Expand Down
10 changes: 7 additions & 3 deletions .github/actions/4-identition/4-parser/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ inputs:
description: Path for the docker cache destination
required: false
default: /tmp/.buildx-cache-new
provider:
runner_temp:
description: 'The deploy provider'
required: true
owner:
Expand Down Expand Up @@ -99,13 +99,17 @@ runs:
- name: Run identity
shell: bash
env:
BASE: "D:/a/_actions/eq19/eq19/v1/.github"
JOB_ID: ${{ inputs.id }}
GH_TOKEN: ${{ inputs.token }}
GCP_TOKEN: ${{ steps.auth.outputs.id_token }}
BASE_GIT: "/d/a/_actions/eq19/eq19/v1/.github"
BASE: "https://github.com/eq19/eq19.github.io.wiki.git"
WIKI: "https://github.com/${{ env.TARGET_REPOSITORY }}.wiki.git"
run: |
curl -s -X POST https://us-central1-feedmapping.cloudfunctions.net/function \
-H "Authorization: Bearer ${GCP_TOKEN}" -H "Content-Type: application/json" \
--data @${{ inputs.workspace }}/docs/data.json | jq '.'
$BASE/entrypoint/init.sh
export PATH=$BASE_GIT/entrypoint:$PATH && init.sh
- name: View context attributes
uses: actions/github-script@v7
Expand Down
17 changes: 1 addition & 16 deletions .github/entrypoint/gist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@

rm -rf ${RUNNER_TEMP}/*dir

WIKI=https://github.com/$1.wiki.git
BASE=https://github.com/eq19/eq19.github.io.wiki.git

#git ls-remote ${WIKI} > /dev/null 2>&1
#if [[ $? == 0 ]]; then git clone $WIKI ${RUNNER_TEMP}/workdir;
#else git clone $BASE ${RUNNER_TEMP}/workdir && rm -rf ${RUNNER_TEMP}/workdir/Home.md; fi
#gh release view --json name,body,tagName --jq '.body' -R eq19/feed
#mv -f ${RUNNER_TEMP}/workdir/virtual /maps/_includes/virtual && mkdir ${RUNNER_TEMP}/gistdir

gh gist clone 0ce5848f7ad62dc46dedfaa430069857 ${RUNNER_TEMP}/gistdir/identition/span1
gh gist clone b32915925d9d365e2e9351f0c4ed786e ${RUNNER_TEMP}/gistdir/identition/span2
gh gist clone 88d09204b2e5986237bd66d062406fde ${RUNNER_TEMP}/gistdir/identition/span3
Expand All @@ -34,12 +25,6 @@ gh gist clone e9832026b5b78f694e4ad22c3eb6c3ef ${RUNNER_TEMP}/gistdir/exponentia
rm -rf ${RUNNER_TEMP}/spin.txt && touch ${RUNNER_TEMP}/spin.txt
find ${RUNNER_TEMP}/gistdir -type f -name "README.md" -exec rm -rf {} \;

git clone $BASE ${RUNNER_TEMP}/workdir
git clone ${BASE} ${RUNNER_TEMP}/workdir
mv -f ${RUNNER_TEMP}/workdir/Home.md ${RUNNER_TEMP}/workdir/README.md
find ${RUNNER_TEMP}/gistdir -type f -name 'spin_*.txt' | sort -n -t _ -k 2 | while ((i++)); IFS= read -r f; do sort.sh $f $i; done

if [[ "${WIKI}" != "${BASE}" ]]; then
git clone $WIKI ${RUNNER_TEMP}/wikidir
mv -f ${RUNNER_TEMP}/wikidir/Home.md ${RUNNER_TEMP}/wikidir/README.md
find ${RUNNER_TEMP}/gistdir -type d -name "$2" -prune -exec sh -c 'wiki.sh "$1"' sh {} \;
fi
11 changes: 11 additions & 0 deletions .github/entrypoint/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ if [[ "${JOB_ID}" == "3" ]]; then

echo -e "\n$hr\nWORKSPACE\n$hr"
gist.sh ${TARGET_REPOSITORY} ${FOLDER}

if [[ "${WIKI}" != "${BASE}" ]]; then
git clone $WIKI ${RUNNER_TEMP}/wikidir
mv -f ${RUNNER_TEMP}/wikidir/Home.md ${RUNNER_TEMP}/wikidir/README.md
find ${RUNNER_TEMP}/gistdir -type d -name "${FOLDER}" -prune -exec sh -c 'wiki.sh "$1"' sh {} \;
fi

find ${RUNNER_TEMP}/gistdir -type d -name .git -prune -exec rm -rf {} \;

mv -f ${RUNNER_TEMP}/workdir/* /home/runner/_site/
Expand All @@ -67,6 +74,10 @@ if [[ "${JOB_ID}" == "3" ]]; then
find . -iname '*.md' -print0 | sort -zn | xargs -0 -I '{}' front.sh '{}'
find . -type d -name "${FOLDER}" -prune -exec sh -c 'cat ${RUNNER_TEMP}/README.md >> $1/README.md' sh {} \;

elif [[ "${JOB_ID}" == "4" ]]; then

echo -e "\n$hr\nWORKSPACE\n$hr"

fi

if [[ -z ${PASS} ]] || [[ "${PASS}" == "true" ]]; then
Expand Down
5 changes: 4 additions & 1 deletion .github/entrypoint/wiki.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ gh gist clone e84a0961dc7636c01d5953d19d65e30a $1/exponentiation/span17
gh gist clone e9832026b5b78f694e4ad22c3eb6c3ef $1/exponentiation/span18

find $1 -type f -name "README.md" -exec rm -rf {} \;
rm -rf ${RUNNER_TEMP}/README.md && mv -f ${RUNNER_TEMP}/wikidir/README.md ${RUNNER_TEMP}/README.md && cp -R ${RUNNER_TEMP}/wikidir/* $1
rm -rf ${RUNNER_TEMP}/README.md

mv -f ${RUNNER_TEMP}/wikidir/README.md ${RUNNER_TEMP}/README.md
cp -R ${RUNNER_TEMP}/wikidir/* $1

rm -rf ${RUNNER_TEMP}/spin.txt && touch ${RUNNER_TEMP}/spin.txt
find $1 -type f -name 'spin_*.txt' | sort -n -t _ -k 2 | while ((i++)); IFS= read -r f; do sort.sh $f $i; done
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,6 @@ jobs:
function: ${{ steps.set-lexering.outputs.function }}

parsering:
needs: lexering
continue-on-error: false
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
Expand All @@ -129,9 +126,12 @@ jobs:
PASS: ${{ contains(needs.*.result, 'success') && true || false }}

# ✔️ Completeness status
needs: lexering
runs-on: ${{ matrix.config.os }}
if: ${{ (always() && contains(needs.*.result, 'success')) ||
(failure() && contains(needs.*.result, 'failure')) }}

continue-on-error: ${{ matrix.config.id == 3 && true || false }}

steps:
- name: 📂 Checkout
uses: actions/checkout@v4
Expand Down

0 comments on commit aa4aa6a

Please sign in to comment.