Compare commits

...

5 Commits

Author SHA1 Message Date
tykayn d3e1b5ab31 fix alt site title on auth 2021-11-21 15:58:50 +01:00
tykayn 3b3cd46795 Merge branch 'master' of https://framagit.org/tykayn/mastodon 2021-11-21 15:58:19 +01:00
tykayn 219194e75f Merge remote-tracking branch 'up/main' 2021-11-13 10:14:27 +01:00
Yusuke Nakamura e510302a7c
Build container image by GitHub Actions (#16973)
* Build container image by GitHub Actions

* Trigger docker build only pushed to main branch

* Tweak tagging imgae

- "edge" is the main branch
- "latest" is the tagged latest release
2021-11-12 05:18:29 +01:00
Claire 18b885ee3a
Fix "bundle exec rails mastodon:setup" crashing in some circumstances (#16976)
Fix regression from #16896
2021-11-11 14:00:30 +01:00
3 changed files with 38 additions and 4 deletions

34
.github/workflows/build-image.yml vendored Normal file
View File

@ -0,0 +1,34 @@
name: Build container image
on:
push:
branches:
- "main"
tags:
- "*"
jobs:
build-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker/setup-buildx-action@v1
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v3
id: meta
with:
images: ghcr.io/${{ github.repository_owner }}/mastodon
flavor: |
latest=true
tags: |
type=edge,branch=main
type=semver,pattern={{ raw }}
- uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/mastodon:latest
cache-to: type=inline

View File

@ -12,7 +12,7 @@
%h2.title.is-2
= t('auth.login')
= image_tag asset_pack_path('media/images/bliss/login.jpg'), alt: @instance_presenter.site_title
= image_tag asset_pack_path('media/images/bliss/login.jpg'), alt: 'Mastodon Bliss'
.form-container
= render 'flashes'

View File

@ -350,11 +350,11 @@ namespace :mastodon do
end
end.join("\n")
generated_header = "# Generated with mastodon:setup on #{Time.now.utc}\n\n"
generated_header = "# Generated with mastodon:setup on #{Time.now.utc}\n\n".dup
if incompatible_syntax
generated_header << "Some variables in this file will be interpreted differently whether you are\n"
generated_header << "using docker-compose or not.\n\n"
generated_header << "# Some variables in this file will be interpreted differently whether you are\n"
generated_header << "# using docker-compose or not.\n\n"
end
File.write(Rails.root.join('.env.production'), "#{generated_header}#{env_contents}\n")