Skip to content

feat: initial rpcproxy implementation #1

feat: initial rpcproxy implementation

feat: initial rpcproxy implementation #1

Workflow file for this run

name: Publish Docker image to GitHub Packages
on:
release:
types: [published]
push:
tags:
- "*"
workflow_dispatch:
jobs:
publish-to-ghcr:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract version from tag and set lowercase repo owner
id: meta
run: |
REF_NAME=${GITHUB_REF#refs/tags/}
VERSION=${REF_NAME#v}
REPO_OWNER=$(echo $GITHUB_REPOSITORY_OWNER | tr '[:upper:]' '[:lower:]')
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "repo_owner=$REPO_OWNER" >> $GITHUB_OUTPUT
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64,linux/arm64/v8
tags: |
ghcr.io/${{ steps.meta.outputs.repo_owner }}/rpcproxy:${{ steps.meta.outputs.version }}
ghcr.io/${{ steps.meta.outputs.repo_owner }}/rpcproxy:latest
labels: |
org.opencontainers.image.version=${{ steps.meta.outputs.version }}
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}