-
Notifications
You must be signed in to change notification settings - Fork 4
40 lines (40 loc) · 1.12 KB
/
release_image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Container
on:
workflow_dispatch:
inputs:
tag:
description: "git tag"
required: true
type: string
push:
tags:
- '*-v[0-9]+.[0-9]+.[0-9]+*'
jobs:
publish-image:
timeout-minutes: 60
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v15
with:
name: syndicationd
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- run: |
if [ -n "${{ inputs.tag }}" ]; then
echo "tag=${{ inputs.tag }}" >> $GITHUB_ENV
else
echo "tag=${{ github.ref_name }}" >> $GITHUB_ENV
fi
- run: nix develop .#ci --accept-flake-config --command nu etc/scripts/docker/build_and_push.nu ${{ env.tag }}