Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mastodon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pierre Boudes
mastodon
Commits
b8931311
Unverified
Commit
b8931311
authored
1 year ago
by
Renaud Chaput
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
Fixes to the new Image build actions (#26056)
parent
626a7b6a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.github/workflows/build-nightly.yml
+6
-3
6 additions, 3 deletions
.github/workflows/build-nightly.yml
.github/workflows/build-push-pr.yml
+8
-1
8 additions, 1 deletion
.github/workflows/build-push-pr.yml
with
14 additions
and
4 deletions
.github/workflows/build-nightly.yml
+
6
−
3
View file @
b8931311
...
...
@@ -13,8 +13,10 @@ jobs:
runs-on
:
ubuntu-latest
steps
:
-
id
:
version_vars
env
:
TZ
:
Etc/UTC
run
:
|
echo mastodon_version_suffix=
+
nightly-$(date +'%Y%m%d')
>> $GITHUB_OUTPUT
echo mastodon_version_suffix=nightly-$(date +'%Y
-
%m
-
%d')>> $GITHUB_OUTPUT
outputs
:
suffix
:
${{ steps.version_vars.outputs.mastodon_version_suffix }}
...
...
@@ -27,7 +29,8 @@ jobs:
push_to_images
:
|
tootsuite/mastodon
ghcr.io/mastodon/mastodon
version_suffix
:
${{ needs.compute-suffix.outputs.suffix }}
# 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
:
|
...
...
@@ -35,5 +38,5 @@ jobs:
tags
:
|
type=raw,value=edge
type=raw,value=nightly
type=schedule,pattern=
nightly-{{date 'YYYY-MM-DD' tz='Etc/UTC'
}}
type=schedule,pattern=
${{ needs.compute-suffix.outputs.suffix
}}
secrets
:
inherit
This diff is collapsed.
Click to expand it.
.github/workflows/build-push-pr.yml
+
8
−
1
View file @
b8931311
...
...
@@ -10,8 +10,15 @@ permissions:
jobs
:
compute-suffix
:
runs-on
:
ubuntu-latest
if
:
${{ !github.event.pull_request.draft && contains(github.event.pull_request.labels.*.name, 'build-image') }}
# This is only allowed to run if:
# - the PR branch is in the `mastodon/mastodon` repository
# - the PR is not a draft
# - the PR has the "build-image" label
if
:
${{ github.event.pull_request.head.repo.full_name == github.repository && !github.event.pull_request.draft && contains(github.event.pull_request.labels.*.name, 'build-image') }}
steps
:
# Repository needs to be cloned so `git rev-parse` below works
-
name
:
Clone repository
uses
:
actions/checkout@v3
-
id
:
version_vars
run
:
|
echo mastodon_version_suffix=+pr-${{ github.event.pull_request.number }}-$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment