Skip to content

ci: build & publish release image (#710) #1

ci: build & publish release image (#710)

ci: build & publish release image (#710) #1

Workflow file for this run

name: Publish
on:
push:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN: nightly-2024-11-29
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
docker:
runs-on: ubuntu-latest
# Add permission to push to GHCR
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- 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: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push hyperion-proxy
uses: docker/build-push-action@v5
with:
context: .
push: true
target: hyperion-proxy
tags: |
${{ env.REGISTRY }}/${{ github.repository }}/hyperion-proxy:latest
${{ env.REGISTRY }}/${{ github.repository }}/hyperion-proxy:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push tag
uses: docker/build-push-action@v5
with:
context: .
push: true
target: tag
tags: |
${{ env.REGISTRY }}/${{ github.repository }}/tag:latest
${{ env.REGISTRY }}/${{ github.repository }}/tag:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max