2024-12-23 18:42:34 +00:00
|
|
|
name: Publish Assets on Release
|
2024-12-06 21:31:20 -05:00
|
|
|
on:
|
2024-12-22 22:14:15 +00:00
|
|
|
release:
|
|
|
|
types: [published]
|
2024-12-08 13:35:40 -05:00
|
|
|
|
2024-12-06 21:31:20 -05:00
|
|
|
permissions:
|
|
|
|
contents: write
|
2024-12-19 06:49:21 -05:00
|
|
|
issues: write
|
|
|
|
|
2024-12-06 21:31:20 -05:00
|
|
|
jobs:
|
2024-12-19 06:49:21 -05:00
|
|
|
buf_push:
|
|
|
|
name: Publish to buf.build/onsonr/sonr
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
# Run `git checkout`
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
# Install the `buf` CLI
|
|
|
|
- uses: bufbuild/buf-setup-action@v1
|
|
|
|
# Push only the Input in `proto` to the BSR
|
|
|
|
- uses: bufbuild/buf-push-action@v1
|
|
|
|
continue-on-error: true
|
|
|
|
with:
|
|
|
|
input: proto
|
|
|
|
buf_token: ${{ secrets.BUF_TOKEN }}
|
2025-01-06 12:06:10 -05:00
|
|
|
|
2025-01-06 12:24:48 -05:00
|
|
|
container-push:
|
|
|
|
name: Publish Container Images
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
|
|
|
|
- name: Build and push
|
|
|
|
uses: docker/build-push-action@v5
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
push: true
|
|
|
|
tags: ghcr.io/onsonr/sonr:latest
|
|
|
|
|
2025-01-06 12:06:10 -05:00
|
|
|
docs-push:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Publish Docs to onsonr.dev
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Configure Git Credentials
|
|
|
|
run: |
|
|
|
|
git config user.name github-actions[bot]
|
|
|
|
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
|
|
|
|
- uses: actions/setup-python@v5
|
|
|
|
with:
|
|
|
|
python-version: 3.x
|
|
|
|
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
|
|
|
- uses: actions/cache@v4
|
|
|
|
with:
|
|
|
|
key: mkdocs-material-${{ env.cache_id }}
|
|
|
|
path: .cache
|
|
|
|
restore-keys: |
|
|
|
|
mkdocs-material-
|
|
|
|
- run: pip install mkdocs-material
|
|
|
|
- run: mkdocs gh-deploy --force
|