mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-03 09:51:39 +00:00
Squash merge develop into master
This commit is contained in:
@@ -1,26 +0,0 @@
|
||||
name: Automatic Tag Bump
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.event.pull_request.merged == true
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.merge_commit_sha }}
|
||||
fetch-depth: "0"
|
||||
|
||||
- name: Bump version and push tag
|
||||
uses: anothrNick/github-tag-action@v1 # Don't use @master or @v1 unless you're happy to test the latest version
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # if you don't want to set write permissions use a PAT token
|
||||
WITH_V: true
|
||||
PRERELEASE: true
|
||||
@@ -11,7 +11,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
# Run `git checkout`
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
# Install the `buf` CLI
|
||||
- uses: bufbuild/buf-setup-action@v1
|
||||
# Push only the Input in `proto` to the BSR
|
||||
@@ -20,3 +20,17 @@ jobs:
|
||||
with:
|
||||
input: proto
|
||||
buf_token: ${{ secrets.BUF_TOKEN }}
|
||||
upload_pkl:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Upload to R2
|
||||
uses: ryand56/r2-upload-action@latest
|
||||
with:
|
||||
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
|
||||
r2-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
|
||||
r2-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
|
||||
r2-bucket: pkljar
|
||||
source-dir: pkl
|
||||
destination-dir: .
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
name: docker image release
|
||||
name: Publish Docker Image
|
||||
|
||||
# NOTE: For this action to work, you must enable write permissions in your github repository settings.
|
||||
# Settings -> Actions -> General. "Workflow Permissions". Select "Read and write permissions".
|
||||
@@ -18,6 +18,10 @@ env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
release-image:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
name: Publish VM Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master, develop, feature/*]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
GO_VERSION: 1.22
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
jobs:
|
||||
release-image:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- run: |
|
||||
DOCKER_REGISTRY=`echo "${{ env.REGISTRY }}/${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]'`
|
||||
echo "DOCKER_REGISTRY=$DOCKER_REGISTRY" >> $GITHUB_ENV
|
||||
|
||||
REPO_NAME=`echo "${{ github.repository }}" | awk -F'/' '{print $2}' | tr '[:upper:]' '[:lower:]'`
|
||||
echo "REPO_NAME=$REPO_NAME" >> $GITHUB_ENV
|
||||
# login to ghcr (public) with codebase remaining private
|
||||
- name: Log in to the Container registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build and push sonrvm image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
target: sonrvm
|
||||
tags: ghcr.io/${{ github.repository_owner }}/sonrvm:latest
|
||||
|
||||
- name: Build and push sonr-runner image
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
push: true
|
||||
target: sonr-runner
|
||||
tags: ghcr.io/${{ github.repository_owner }}/sonr-runner:latest
|
||||
@@ -4,11 +4,13 @@ name: "Release Binary"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
tags:
|
||||
- '**'
|
||||
- v*
|
||||
|
||||
# Test Locally with:
|
||||
# goreleaser build --skip-validate --snapshot --clean
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
goreleaser:
|
||||
@@ -20,9 +22,9 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-go@v2
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '1.21'
|
||||
go-version: "1.21"
|
||||
|
||||
- name: Clean up dist directory
|
||||
run: rm -rf dist
|
||||
@@ -40,4 +42,4 @@ jobs:
|
||||
version: latest
|
||||
args: release --skip-validate --clean
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -1,92 +0,0 @@
|
||||
name: cloud testnet
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v[0-9]+.[0-9]+.[0-9]+' # ignore rc
|
||||
|
||||
# https://github.com/<org>/<repo>/settings/secrets/actions/new
|
||||
# - HCLOUD_TOKEN
|
||||
# - SSH_PRIVATE_KEY
|
||||
|
||||
env:
|
||||
GO_VERSION: 1.21.0
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
LOCALIC_PORT: 8080
|
||||
LOCALIC_AUTH_KEY: ""
|
||||
HETZNER_SSH_KEY: "reece-hetzner"
|
||||
# HETZNER_MACHINE_TYPE: "cpx31" # shared 4vCPU ($7/Mo)
|
||||
HETZNER_MACHINE_TYPE: "ccx23" # dedicated 4 CPU 16GB Ram ($25/Mo)
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
launch-testnet:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: TimDaub/hetzner-cloud-deploy-server-action@v2
|
||||
with:
|
||||
# gh-actions-tn-v1.0.0
|
||||
server-name: "gh-actions-tn-${{github.ref_name}}"
|
||||
server-image: "ubuntu-22.04"
|
||||
server-type: ${{ env.HETZNER_MACHINE_TYPE }}
|
||||
ssh-key-name: ${{ env.HETZNER_SSH_KEY }}
|
||||
delete-server: false
|
||||
startup-timeout: 40000 # ms
|
||||
hcloud-token: ${{ secrets.HCLOUD_TOKEN }}
|
||||
|
||||
- name: Set env variables
|
||||
run: |
|
||||
mkdir -p ~/.ssh/ && ssh-keyscan -H $SERVER_IPV4 >> ~/.ssh/known_hosts
|
||||
echo "SERVER_IPV4_ADDR=$SERVER_IPV4" >> $GITHUB_ENV
|
||||
echo "GITHUB_SHA=${{github.sha}}" >> $GITHUB_ENV
|
||||
echo "GITHUB_REF_NAME=${{ github.ref_name }}" >> $GITHUB_ENV
|
||||
echo "LOCALIC_PORT=${{ env.LOCALIC_PORT }}" >> $GITHUB_ENV
|
||||
|
||||
- uses: JasonEtco/create-an-issue@v2.9.2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
filename: .github/testnet.md
|
||||
update_existing: true
|
||||
|
||||
- name: Testnet setup
|
||||
uses: appleboy/ssh-action@v1.0.3
|
||||
with:
|
||||
host: ${{ env.SERVER_IPV4_ADDR }}
|
||||
username: root
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
port: 22
|
||||
script: |
|
||||
sudo apt-get update
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt -y install make gcc jq bison ca-certificates curl
|
||||
|
||||
wget https://go.dev/dl/go1.22.1.linux-amd64.tar.gz
|
||||
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.22.1.linux-amd64.tar.gz
|
||||
echo "export PATH=$PATH:/usr/local/go/bin" >> ~/.bashrc
|
||||
export PATH=$PATH:/usr/local/go/bin
|
||||
bash # idk if I can use this or not
|
||||
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get remove -y containerd.io
|
||||
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install docker.io docker-compose
|
||||
sudo apt-get update
|
||||
|
||||
wget https://github.com/strangelove-ventures/interchaintest/releases/download/v8.2.0/local-ic && chmod +x local-ic
|
||||
sudo mv local-ic /usr/local/bin
|
||||
|
||||
git clone https://github.com/strangelove-ventures/heighliner.git && cd heighliner
|
||||
go build && chmod +x heighliner
|
||||
sudo mv heighliner /usr/local/bin
|
||||
|
||||
cd ~/
|
||||
git clone https://github.com/${{ github.repository }}.git chain && cd chain
|
||||
git checkout ${{ github.ref_name }}
|
||||
make local-image
|
||||
|
||||
sudo screen -S testnet -d -m local-ic start ibc-testnet --api-address=0.0.0.0 --api-port=${{ env.LOCALIC_PORT }} --auth-key=${{ env.LOCALIC_AUTH_KEY }}
|
||||
|
||||
Reference in New Issue
Block a user