Skip to content

v6.0.43

v6.0.43 #88

Workflow file for this run

on:
release:
types:
- published
workflow_dispatch:
name: Publish Docker Image
jobs:
publish-image:
concurrency: publish-image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@7ac1ec25491415c381d9b62f0657c7a028df52a7 # v24
with:
nix_path: nixpkgs=channel:nixos-unstable-small
extra_nix_config: |
experimental-features = nix-command flakes
- uses: cachix/cachix-action@v13
with:
name: minesweep
extraPullNames: nix-community,naersk
- run: nix build -L '.#minesweep-image' --no-link
- name: load image
run: |
set -euo pipefail
docker load -i "$(nix path-info -L '.#minesweep-image')"
- name: create Dockerfile
run: |
set -euo pipefail
echo "FROM minesweep:$(nix eval --raw '.#minesweep-image.imageTag')" > Dockerfile
- uses: docker/metadata-action@v5
id: meta
with:
images: |
ghcr.io/${{ github.repository_owner }}/minesweep-rs
tags: |
type=semver,pattern=v{{version}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern=v{{major}}
type=sha
type=sha,format=long
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}