forked from mastodon/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added job to build nightly container (mastodon#24595)
- Loading branch information
1 parent
c1a7e38
commit e798b86
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Build nightly container image | ||
on: | ||
schedule: | ||
- cron: '0 2 * * *' # run at 2 AM UTC | ||
permissions: | ||
contents: read | ||
packages: write | ||
|
||
jobs: | ||
build-nightly-image: | ||
runs-on: ubuntu-latest | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: hadolint/[email protected] | ||
- uses: docker/setup-qemu-action@v2 | ||
- uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Log in to the Github Container registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: docker/metadata-action@v4 | ||
id: meta | ||
with: | ||
images: | | ||
ghcr.io/mastodon/mastodon | ||
flavor: | | ||
latest=auto | ||
tags: | | ||
type=raw,value=nightly | ||
labels: | | ||
org.opencontainers.image.description=Nightly build image used for testing purposes | ||
- uses: docker/build-push-action@v4 | ||
with: | ||
context: . | ||
platforms: linux/amd64,linux/arm64 | ||
provenance: false | ||
builder: ${{ steps.buildx.outputs.name }} | ||
push: ${{ github.repository == 'mastodon/mastodon' && github.event_name != 'pull_request' }} | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |