Skip to content

Rust Cross OCI

Rust Cross OCI #25

Workflow file for this run

name: "Rust Cross OCI"
on:
workflow_dispatch:
inputs:
version:
description: "Version of the toolchain to use"
required: true
type: string
channel:
description: "Channel to tag the image with"
type: choice
options: ["latest", "nightly"]
env:
REGISTRY_IMAGE: ghcr.io/theedward162/rust-cross
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Set up Docker QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
uses: docker/build-push-action@v5
with:
context: .
file: rust-cross.Dockerfile
platforms: linux/amd64,linux/arm64
tags: ${{ env.REGISTRY_IMAGE }}:${{ github.sha }},${{ env.REGISTRY_IMAGE }}:${{ inputs.channel }},${{ env.REGISTRY_IMAGE }}:${{ inputs.version }}
push: true
build-args: "RUST_TOOLCHAIN=${{ inputs.version }}"