-
Notifications
You must be signed in to change notification settings - Fork 20
51 lines (43 loc) · 1.39 KB
/
docker-publish.yml
File metadata and controls
51 lines (43 loc) · 1.39 KB
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
41
42
43
44
45
46
47
48
49
50
51
name: Docker
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
schedule:
- cron: "32 19 * * *"
push:
# Publish semver tags as releases.
tags: ["v*.*.*"]
workflow_dispatch:
workflow_call:
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
jobs:
docker_build:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
steps:
- uses: samueldr/lix-gha-installer-action@latest
- name: Checkout repository
uses: actions/checkout@v6
- name: Determine whether to push
id: docker_pushable
run: echo should=${{ toJSON(github.event_name != 'merge_group') }} >>$GITHUB_OUTPUT
- name: Build the docker images we care about
run: |
nix build .#tsnsrvOciImage-cross-aarch64-linux .#tsnsrvOciImage
- name: Push to ghcr
run: nix run .#pushImagesToGhcr --impure
if: steps.docker_pushable.outputs.should == 'true'
env:
GH_TOKEN: ${{ github.token }}