Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,33 @@
name: Push Docker Image

on:
push:
tags:
- '*'
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:${{ github.event.release.tag_name }}

- 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
Expand All @@ -39,4 +36,4 @@ jobs:
push: true
tags: |
ghcr.io/artificialio/perfly:latest
ghcr.io/artificialio/perfly:${{ github.event.release.tag_name }}
ghcr.io/artificialio/perfly:${{ inputs.release_name }}