diff --git a/gno_github_agent/.dockerignore b/gno_github_agent/.dockerignore new file mode 100644 index 0000000000..2eea525d88 --- /dev/null +++ b/gno_github_agent/.dockerignore @@ -0,0 +1 @@ +.env \ No newline at end of file diff --git a/gno_github_agent/.env b/gno_github_agent/.env index 4d48a6b1ce..d0abb68d7b 100644 --- a/gno_github_agent/.env +++ b/gno_github_agent/.env @@ -1,5 +1,5 @@ -GNO_MNEMONIC=scissors razor beauty delay derive chronic toss burger gravity shallow couch slogan change tray connect frame token slight zone usage sad monkey pyramid change -GNO_CHAIN_ID=dev -GNO_RPC_ADDR=http://127.0.0.1:26657 +GNO_MNEMONIC=source bonus chronic canvas draft south burst lottery vacant surface solve popular case indicate oppose farm nothing bullet exhibit title speed wink action roast +GNO_CHAIN_ID=test4 +GNO_RPC_ADDR=https://rpc.test4.gno.land:443 GNO_REALM_PATH=gno.land/r/teritori/ghverify -GNO_TX_INDEXER=http://localhost:8546/graphql/query \ No newline at end of file +GNO_TX_INDEXER=https://indexer.test4.gno.testnet.teritori.com \ No newline at end of file diff --git a/gno_github_agent/Dockerfile b/gno_github_agent/Dockerfile new file mode 100644 index 0000000000..9f497dd44f --- /dev/null +++ b/gno_github_agent/Dockerfile @@ -0,0 +1,14 @@ +# Start from the latest golang base image +FROM golang:1.23-bullseye + +# Set the Current Working Directory inside the container +WORKDIR /app + +# Copy everything from the current directory to the Working Directory inside the container +COPY . . + +ENV CGO_ENABLED=1 +RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go go build -o bin/main main.go + +CMD [ "/app/bin/main" ] + diff --git a/gno_github_agent/Makefile b/gno_github_agent/Makefile index eef75603a6..4dfbaf37e5 100644 --- a/gno_github_agent/Makefile +++ b/gno_github_agent/Makefile @@ -1,95 +1,7 @@ -KEY = MyKey -BASE = teritori -REMOTE = http://127.0.0.1:26657 -CHAIN_ID = dev +DOCKER_REGISTRY=rg.nl-ams.scw.cloud/teritori +AGENT_DOCKER_IMAGE=$(DOCKER_REGISTRY)/gno-gh-verify-agent:$(shell git rev-parse --short HEAD) -.PHONY: add_social_feeds_realm add_utf16_pkg add_ujson_pkg add_flags_index_pkg add_dao_interfaces_pkg add_social_feed all - -add_gh_verify_realm: - gnokey maketx addpkg \ - -deposit="1ugnot" \ - -gas-fee="1ugnot" \ - -gas-wanted="50000000" \ - -broadcast="true" \ - -chainid="${CHAIN_ID}" \ - -remote="${REMOTE}" \ - -pkgdir="./r/gnoland/ghverify" \ - -pkgpath="gno.land/r/${BASE}/ghverify" \ - ${KEY} - -request_verification: - gnokey maketx call \ - -pkgpath "gno.land/r/${BASE}/ghverify" \ - -func="RequestVerification" \ - -gas-fee="1000000ugnot" \ - -gas-wanted="3000000" \ - -remote="${REMOTE}" \ - -chainid="${CHAIN_ID}" \ - -broadcast \ - -args "villaquiranm" \ - MyKey - -check_current_feeds: - gnokey query vm/qeval --data 'gno.land/r/${BASE}/ghverify.GnorkleEntrypoint("request")' - -remote="${REMOTE}" \ - ${KEY} - -set_owner: - gnokey maketx call \ - -pkgpath "gno.land/r/${BASE}/ghverify" \ - -func="SetOwner" \ - -gas-fee="1000000ugnot" \ - -gas-wanted="3000000" \ - -remote="${REMOTE}" \ - -chainid="${CHAIN_ID}" \ - -broadcast \ - -args "g1yr5sts6w9k2arsuk858lh6phegcfvg0y4d0pgf" \ - ${KEY} - -verify: - gnokey maketx call \ - -pkgpath "gno.land/r/${BASE}/ghverify" \ - -func="GnorkleEntrypoint" \ - -gas-fee="1000000ugnot" \ - -gas-wanted="3000000" \ - -remote="${REMOTE}" \ - -chainid="${CHAIN_ID}" \ - -broadcast \ - -args "ingest,g1pwxuhltfqxcumjmuquuue6y3f2g3f2d0rcq52x,OK" \ - ${KEY} -relay_verify: - gnokey maketx call \ - -pkgpath "gno.land/r/${BASE}/ghverify" \ - -func="GnorkleEntrypoint" \ - -gas-fee="1000000ugnot" \ - -gas-wanted="3000000" \ - -remote="${REMOTE}" \ - -chainid="${CHAIN_ID}" \ - -broadcast \ - -args "relay,gpub1pgfj7ard9eg82cjtv4u4xetrwqer2dntxyfzxz3pqgfakcapzvuux7vug9vagyjmvj6k2w2xu723qnue69z9r7wlt9c6zeyxvt8,dd4b4012daddb14fe7587f4bbb5bef5f16d123032e5c6dc718528907c8f71ee267c1a051328d42991fe6f82cdba424efd3866251cf9411c8f38ebb1e144f10ce,ingest,g14vxq5e5pt5sev7rkz2ej438scmxtylnzv5vnkw,OK" \ - newkey - -check: - gnokey maketx call \ - -pkgpath "gno.land/r/${BASE}/ghverify" \ - -func="GnorkleEntrypoint" \ - -gas-fee="1000000ugnot" \ - -gas-wanted="3000000" \ - -remote="${REMOTE}" \ - -chainid="${CHAIN_ID}" \ - -broadcast \ - -args "request" \ - ${KEY} - -send: - gnokey maketx send \ - -gas-fee="1000000ugnot" \ - -gas-wanted="3000000" \ - -remote="${REMOTE}" \ - -chainid="${CHAIN_ID}" \ - -send="100000ugnot" \ - -to "g1yr5sts6w9k2arsuk858lh6phegcfvg0y4d0pgf" \ - -broadcast \ - ${KEY} - - \ No newline at end of file +.PHONY: publish +publish: + docker build . --platform linux/amd64 -t $(AGENT_DOCKER_IMAGE) + docker push $(AGENT_DOCKER_IMAGE)