~cytrogen/masto-fe

ref: 80f89f9cf25436d07ed7dcf908392daf686f7dff masto-fe/.github/workflows/build-nightly.yml -rw-r--r-- 1.2 KiB
80f89f9c — Claire Merge commit '9974163776b3e65e7cfa41e6293876909a1635b7' into glitch-soc/merge-upstream 2 years ago
                                                                                
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
name: Build nightly container image
on:
  workflow_dispatch:
  schedule:
    - cron: '0 2 * * *' # run at 2 AM UTC

permissions:
  contents: read
  packages: write

jobs:
  compute-suffix:
    runs-on: ubuntu-latest
    steps:
      - id: version_vars
        env:
          TZ: Etc/UTC
        run: |
          echo mastodon_version_suffix=nightly-$(date +'%Y-%m-%d')>> $GITHUB_OUTPUT
    outputs:
      suffix: ${{ steps.version_vars.outputs.mastodon_version_suffix }}

  build-image:
    needs: compute-suffix
    uses: ./.github/workflows/build-container-image.yml
    with:
      platforms: linux/amd64,linux/arm64
      use_native_arm64_builder: false
      push_to_images: |
        ghcr.io/${{ github.repository_owner }}/mastodon
      # The `+` is important here, result will be v4.1.2+nightly-2022-03-05
      version_suffix: +${{ needs.compute-suffix.outputs.suffix }}
      labels: |
        org.opencontainers.image.description=Nightly build image used for testing purposes
      flavor: |
        latest=auto
      tags: |
        type=raw,value=edge
        type=raw,value=nightly
        type=schedule,pattern=${{ needs.compute-suffix.outputs.suffix }}
    secrets: inherit