commit c742a784ab17436dbcc8a119cd3c1e4ccc3950e5 Author: Evan Ferrao Date: Sat May 13 16:36:48 2023 +0000 Forgejo Builder: Initial Commit diff --git a/.github/workflows/Build_Forgejo.yaml b/.github/workflows/Build_Forgejo.yaml new file mode 100644 index 0000000..a5ae0a5 --- /dev/null +++ b/.github/workflows/Build_Forgejo.yaml @@ -0,0 +1,59 @@ +name: Build Forgejo + +on: + workflow_dispatch: + schedule: + - cron: '0 0 * * 0' + +jobs: + docker-build: + runs-on: ubuntu-latest + timeout-minutes: 20 + permissions: + packages: write + steps: + + - name: Clone forgejo + run: git clone --depth=1 --single-branch https://codeberg.org/forgejo/forgejo.git . + + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Login to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Build and push forgejo + uses: docker/build-push-action@v4 + continue-on-error: true + with: + context: . + push: true + #cache-from: type=registry,ref=boxinaclosedbox/forgejo:buildcache + #cache-to: type=registry,ref=boxinaclosedbox/forgejo:buildcache,mode=max + tags: | + ghcr.io/boxinaclosedbox/forgejo:latest + boxinaclosedbox/forgejo:latest + file: Dockerfile + + - name: Build and push forgejo rootless + uses: docker/build-push-action@v4 + continue-on-error: true + with: + context: . + push: true + #cache-from: type=registry,ref=boxinaclosedbox/forgejo:buildcache + #cache-to: type=registry,ref=boxinaclosedbox/forgejo:buildcache,mode=max + tags: | + ghcr.io/boxinaclosedbox/forgejo:latest-rootless + boxinaclosedbox/forgejo:latest-rootless + file: Dockerfile.rootless \ No newline at end of file diff --git a/.github/workflows/Keep-Alive.yaml b/.github/workflows/Keep-Alive.yaml new file mode 100644 index 0000000..208f423 --- /dev/null +++ b/.github/workflows/Keep-Alive.yaml @@ -0,0 +1,27 @@ +name: Keep Actions Alive + +on: + workflow_dispatch: + schedule: + - cron: '2 1 2 * *' +jobs: + KeepAlive: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkouts + uses: actions/checkout@v3 + + - name: Commit to 'keepalive' branch + run: | + REPO_URL=$(git config --get remote.origin.url) ; REPO_BASE=$(echo "${REPO_URL}" |sed 's/.*\/\///g') ; USERNAME=$(echo $REPO_BASE |sed 's/\/.*//g') ; GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}} + if [ "${GITHUB_EMAIL}" = "" ]; then GITHUB_EMAIL=boxinaclosedbox@gmail.com ; fi ; git config --global user.email "${GITHUB_EMAIL}" + if [ "${GITHUB_USERNAME}" = "" ]; then GITHUB_USERNAME="Box In A Box" ; fi ; git config --global user.name "${GITHUB_USERNAME}" + rm -rf * .git .github + echo "${RANDOM}${RANDOM}${RANDOM}${RANDOM}${RANDOM}" >> Random.txt + git init ; git add Random.txt + git commit -m "KeepALive As of \"$(date)\"" + git remote add origin https://"{USERNAME}":"${GITHUB_TOKEN}"@"${REPO_BASE}" + git checkout -b keepalive + git push --set-upstream origin keepalive -f \ No newline at end of file