Skip to content

Publish Docker image #50

Publish Docker image

Publish Docker image #50

Workflow file for this run

name: Publish Docker image
on:
push:
branches: [main]
schedule:
# Every Monday at 02:00 UTC
- cron: "0 2 * * 1"
workflow_dispatch:
inputs:
rust_toolchain:
description: "Rust toolchain"
required: true
default: "nightly"
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/vita-rust/vitasdk-rs
tags: |
type=raw,value=latest
- name: Build and push Docker image to ghcr
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: "RUST_TOOLCHAIN=${{ github.event.inputs.rust_toolchain || 'nightly' }}"