0
0

Added Cloudtube + Stopped building 4get
Some checks failed
wolfree / build (push) Failing after 6s
simplytranslate / build (push) Failing after 6s
searxng / build-searxng-base (push) Successful in 7s
searxng / build-searxng (push) Failing after 6s
scribe / build (push) Failing after 5s
rat-aint-tieba / build (push) Failing after 8s
proxigram / build (push) Failing after 5s
nitter / build (push) Failing after 4s
imgin / build (push) Failing after 6s
binternet / build (push) Successful in 43s

This commit is contained in:
Opnxng 2023-11-20 01:08:13 +08:00
parent 0b326a9084
commit 3e9df41a65
2 changed files with 73 additions and 1 deletions

View File

@ -0,0 +1,72 @@
name: 4get
run-name: 4get
env:
REPO_NAME: 4get
REMOTE_REPO: https://git.lolcat.ca/lolcat/4get.git
BUILD_PLATFORM: linux/arm64,linux/amd64
#on:
# schedule:
# - cron: "0 0 * * *" # at midnight
# push:
# paths:
# - ".gitea/workflows/4get.yaml"
jobs:
build:
runs-on: runner
container:
image: docker:cli
steps:
- name: Install packages
run: apk --no-cache add curl git jq
- name: Check latest upstream commit
run: |
STORED_COMMIT=$(curl -H "Authorization: Bearer ${{ secrets.NT }}" -s "https://nt.opnxng.com/${REPO_NAME}/raw?poll=1" | tail -n 1)
LATEST_COMMIT=$(git ls-remote ${REMOTE_REPO} | awk '{print $1}' | head -1)
echo "STORED_COMMIT=${STORED_COMMIT}" >> "$GITHUB_ENV"
echo "LATEST_COMMIT=${LATEST_COMMIT}" >> "$GITHUB_ENV"
echo "Stored Commit: ${STORED_COMMIT}"
echo "Latest Commit: ${LATEST_COMMIT}"
- name: Build and push Docker image
run: |
if [ "$STORED_COMMIT" != "$LATEST_COMMIT" ]; then
echo "Found a new commit, building new image"
# Install Docker Buildx
BUILDX_VERSION=$(wget -q -O- https://api.github.com/repos/docker/buildx/releases/latest | jq -r '.name')
wget -O /usr/bin/docker-buildx https://github.com/docker/buildx/releases/download/$BUILDX_VERSION/buildx-$BUILDX_VERSION.linux-arm64
chmod +x /usr/bin/docker-buildx
# Create and use Docker Buildx builder
docker-buildx create --use --name buildx
# Login to Package Registry
echo "${{ secrets.TOKEN }}" | docker login git.opnxng.com -u ${{ gitea.repository_owner }} --password-stdin
# Build and push Docker image
mkdir temp
cd temp
git clone ${REMOTE_REPO} .
docker-buildx build \
--platform ${BUILD_PLATFORM} \
-t git.opnxng.com/${{ gitea.repository_owner }}/${REPO_NAME}:latest \
-f ./Dockerfile \
--push . && \
curl -H prio:low -d "Built and pushed ${REPO_NAME}" https://ntfy.opnxng.com/build || \
{ curl -H tags:warning -H prio:high -d "Built and pushed ${REPO_NAME} failed!" https://ntfy.opnxng.com/build ; exit 1; }
# Remove Docker Buildx builder
docker-buildx rm buildx
else
echo "No new commit, skipped build"
fi
- name: Update stored commit
run: |
if [ "$STORED_COMMIT" != "$LATEST_COMMIT" ]; then
curl -H "Authorization: Bearer ${{ secrets.NT }}" -d $(git ls-remote ${REMOTE_REPO} | awk '{print $1}' | head -1) "https://nt.opnxng.com/${REPO_NAME}"
STORED_COMMIT=$(curl -H "Authorization: Bearer ${{ secrets.NT }}" -s "https://nt.opnxng.com/${REPO_NAME}/raw?poll=1" | tail -n 1)
echo "STORED_COMMIT=${STORED_COMMIT}" >> "$GITHUB_ENV"
else
curl -H "Authorization: Bearer ${{ secrets.NT }}" -d $(git ls-remote ${REMOTE_REPO} | awk '{print $1}' | head -1) "https://nt.opnxng.com/${REPO_NAME}"
STORED_COMMIT=$(curl -H "Authorization: Bearer ${{ secrets.NT }}" -s "https://nt.opnxng.com/${REPO_NAME}/raw?poll=1" | tail -n 1)
echo "STORED_COMMIT=${STORED_COMMIT}" >> "$GITHUB_ENV"
exit 1
fi

View File

@ -22,7 +22,6 @@ Source | Image
[kev/imgin](https://git.voidnet.tech/kev/imgin) | opnxng/imgin [kev/imgin](https://git.voidnet.tech/kev/imgin) | opnxng/imgin
[edwardloveall/Scribe](https://sr.ht/~edwardloveall/Scribe/) | opnxng/scribe [edwardloveall/Scribe](https://sr.ht/~edwardloveall/Scribe/) | opnxng/scribe
[wolfree/wolfree-dockerfile](https://gitea.com/wolfree/wolfree-dockerfile) | opnxng/wolfree [wolfree/wolfree-dockerfile](https://gitea.com/wolfree/wolfree-dockerfile) | opnxng/wolfree
[lolcat/4get](https://git.lolcat.ca/lolcat/4get) | opnxng/4get
[ThePenguinDev/proxigram](https://codeberg.org/ThePenguinDev/proxigram) | opnxng/proxigram [ThePenguinDev/proxigram](https://codeberg.org/ThePenguinDev/proxigram) | opnxng/proxigram
[Bing Chilling/Rat Aint Tieba](https://0xacab.org/johnxina/rat) | opnxng/rat-aint-tieba [Bing Chilling/Rat Aint Tieba](https://0xacab.org/johnxina/rat) | opnxng/rat-aint-tieba
[ansible/ansible](https://github.com/ansible/ansible) | opnxng/ansible [ansible/ansible](https://github.com/ansible/ansible) | opnxng/ansible
@ -31,6 +30,7 @@ Source | Image
[cadence/breezewiki](https://gitdab.com/cadence/breezewiki) | [pussthecatorg/breezewiki](https://quay.io/repository/pussthecatorg/breezewiki?tab=tags&tag=latest) [cadence/breezewiki](https://gitdab.com/cadence/breezewiki) | [pussthecatorg/breezewiki](https://quay.io/repository/pussthecatorg/breezewiki?tab=tags&tag=latest)
[timvisee/send](https://github.com/timvisee/send) | [xavion-lux/send](https://gitlab.com/timvisee/send/-/merge_requests/31) [timvisee/send](https://github.com/timvisee/send) | [xavion-lux/send](https://gitlab.com/timvisee/send/-/merge_requests/31)
[httpjamesm/AnonymousOverflow](https://github.com/httpjamesm/AnonymousOverflow) | [aryak/anonymousoverflow-docker-builds](https://codeberg.org/aryak/anonymousoverflow-docker-builds) [httpjamesm/AnonymousOverflow](https://github.com/httpjamesm/AnonymousOverflow) | [aryak/anonymousoverflow-docker-builds](https://codeberg.org/aryak/anonymousoverflow-docker-builds)
[cadence/tube-meta](https://git.sr.ht/~cadence/tube-meta) | [abeltramo/cloudtube](https://github.com/ABeltramo/cloudtube-docker/tree/main)
[maxmind/geoipupdate](https://github.com/maxmind/geoipupdate) | maxmind/geoipupdate [maxmind/geoipupdate](https://github.com/maxmind/geoipupdate) | maxmind/geoipupdate
[pablouser1/ProxiTok](https://github.com/pablouser1/ProxiTok) | pablouser1/proxitok [pablouser1/ProxiTok](https://github.com/pablouser1/ProxiTok) | pablouser1/proxitok
[PrivateBin/PrivateBin](https://github.com/PrivateBin/PrivateBin) | privatebin/unit-alpine [PrivateBin/PrivateBin](https://github.com/PrivateBin/PrivateBin) | privatebin/unit-alpine