Skip to content

Push Docker Image

Push Docker Image #1

Workflow file for this run

name: Push Docker Image
on:
workflow_dispatch:
inputs:
release_name:
description: 'Release name/tag for the Docker image'
required: true
type: string
jobs:
docker:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: nixbuild/nix-quick-install-action@v28
with:
nix_conf: experimental-features = nix-command flakes
# Log in to GHCR
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Create a docker image
- run: nix run .#packages.x86_64-linux.container.copyToDockerDaemon
- run: docker tag perfly:latest ghcr.io/artificialio/perfly:${{ inputs.release_name }}
# Build and push the image
- name: Build and Push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
ghcr.io/artificialio/perfly:latest
ghcr.io/artificialio/perfly:${{ inputs.release_name }}