Compare commits

...

10 commits

Author SHA1 Message Date
DataHoarder 2fc7c6c06f
Introduce THELOUNGE_REPOSITORY to specify upstream repository to compile from 2023-06-07 17:17:50 +02:00
github-actions[bot] 8c34c7afe9
chore(master): release 4.4.1-rc.2 (#174)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2023-06-01 21:29:00 +02:00
William Boman abb97f4928
fix(release-please): target master instead of main (#173) 2023-06-01 21:22:44 +02:00
renovate[bot] 3b9f4f0d35
chore(deps): update dependency thelounge to v4.4.1-rc.2 (#172)
Release-As: 4.4.1-rc.2

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-06-01 19:09:03 +00:00
William Boman 3466f9d68d
fix(renovate): set ignoreUnstable: false (#171) 2023-06-01 20:53:47 +02:00
William Boman 121d133311
chore: remove Makefile (#170)
This is not used for anything and isn't particularly maintained.
2023-06-01 20:42:40 +02:00
William Boman 27fe810b19
fix(renovate): fix npm versioning range (#169) 2023-06-01 20:37:21 +02:00
William Boman 4dbcf181e5
chore(ci): add renovate validation workflow (#168) 2023-06-01 20:27:55 +02:00
William Boman bec4974f55
feat: automatic releases (#165)
This uses:
    1) Renovate for managing the latest `thelounge` version.
    2) Release Please Action for automating creation of release PRs and
       releases (once the release PR is merged).
    3) Automerge Action for automatically merging PRs created by Release
       Please Action.
2023-05-31 01:57:56 +02:00
William Boman c01bd0b076
thelounge@4.4.1-rc.1 (#163) 2023-05-21 16:04:45 +02:00
10 changed files with 182 additions and 13 deletions

34
.github/workflows/automerge.yml vendored Normal file
View file

@ -0,0 +1,34 @@
name: automerge
on:
pull_request:
types:
- labeled
- unlabeled
- synchronize
- opened
- edited
- ready_for_review
- reopened
- unlocked
pull_request_review:
types:
- submitted
check_suite:
types:
- completed
status: {}
permissions:
contents: write
pull-requests: write
jobs:
automerge:
runs-on: ubuntu-latest
steps:
- id: automerge
name: automerge
uses: pascalgn/automerge-action@v0.15.6
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

View file

@ -25,7 +25,7 @@ jobs:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v1
uses: actions/checkout@v3
with:
fetch-depth: 0

View file

@ -1,10 +1,33 @@
---
name: Test docker containers
on:
pull_request:
jobs:
diff:
name: Check if Dockerfile changed
runs-on: ubuntu-latest
outputs:
did_change: ${{ steps.diff.outputs.any_changed }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check for changes
id: diff
run: |
if [[ $(git diff --name-only "origin/${GITHUB_BASE_REF}" -- Dockerfile | wc -l) -gt 0 ]]; then
echo "any_changed=true" >> "$GITHUB_OUTPUT"
else
echo "any_changed=false" >> "$GITHUB_OUTPUT"
fi
build:
needs: [diff]
if: ${{ needs.diff.outputs.did_change == 'true' }}
name: Build
runs-on: ubuntu-latest
strategy:
@ -18,6 +41,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
@ -58,3 +83,12 @@ jobs:
- name: Logs
if: always()
run: docker logs thelounge
# This job is used for branch protection rule
build-check:
name: Build check
runs-on: ubuntu-latest
needs: build
if: 'failure() || cancelled()'
steps:
- run: exit 1

27
.github/workflows/release-please.yml vendored Normal file
View file

@ -0,0 +1,27 @@
---
name: Release
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: simple
package-name: thelounge-docker
prerelease: true
include-v-in-tag: false
labels: |
automerge

34
.github/workflows/validate.yml vendored Normal file
View file

@ -0,0 +1,34 @@
---
name: Validate Renovate config
on:
push:
branches:
- main
pull_request:
jobs:
validate:
name: Validate renovate config
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Check for changes
id: diff
run: |
if [[ $(git diff --name-only "origin/${GITHUB_BASE_REF}" -- renovate.json | wc -l) -gt 0 ]]; then
echo "any_changed=true" >> "$GITHUB_OUTPUT"
else
echo "any_changed=false" >> "$GITHUB_OUTPUT"
fi
- shell: bash
if: ${{ steps.diff.outputs.any_changed == 'true' }}
run: |
set +o pipefail
npx -y -p renovate -c renovate-config-validator \
| tee /dev/stderr \
| grep -Evz '(ERROR|could not be parsed)'

View file

@ -1,5 +1,27 @@
# Changelog
## [4.4.1-rc.2](https://github.com/thelounge/thelounge-docker/compare/4.4.1-rc.1...4.4.1-rc.2) (2023-06-01)
### Features
* automatic releases ([#165](https://github.com/thelounge/thelounge-docker/issues/165)) ([bec4974](https://github.com/thelounge/thelounge-docker/commit/bec4974f558c376acaed9a32ce219ec46239101f))
### Bug Fixes
* **release-please:** target master instead of main ([#173](https://github.com/thelounge/thelounge-docker/issues/173)) ([abb97f4](https://github.com/thelounge/thelounge-docker/commit/abb97f49284efe06e05244d6c3401089126c8190))
* **renovate:** fix npm versioning range ([#169](https://github.com/thelounge/thelounge-docker/issues/169)) ([27fe810](https://github.com/thelounge/thelounge-docker/commit/27fe810b19556af2806d321e2c63e0995d07831b))
* **renovate:** set ignoreUnstable: false ([#171](https://github.com/thelounge/thelounge-docker/issues/171)) ([3466f9d](https://github.com/thelounge/thelounge-docker/commit/3466f9d68d6c622eac20bbed3ddcb4b86e1b0f37))
### Miscellaneous Chores
* **deps:** update dependency thelounge to v4.4.1-rc.2 ([#172](https://github.com/thelounge/thelounge-docker/issues/172)) ([3b9f4f0](https://github.com/thelounge/thelounge-docker/commit/3b9f4f0d359dfcf2eaac271d341889c0f23e055d))
## 4.4.1-rc.1 (2023-05-21)
- Bump [`thelounge`][1] to [`4.4.1-rc.1`](https://github.com/thelounge/thelounge/releases/tag/v4.4.1-rc.1).
## 4.4.0 (2023-05-14)
- Bump [`thelounge`][1] to [`4.4.0`](https://github.com/thelounge/thelounge/releases/tag/v4.4.0).
- Also publish images to ghcr.io/thelounge/thelounge, which henceforth is the default repository.

View file

@ -1,6 +1,7 @@
FROM node:lts-alpine
ARG THELOUNGE_VERSION=4.4.0
ARG THELOUNGE_REPOSITORY=git+https://github.com/thelounge/thelounge.git
ARG THELOUNGE_VERSION=4.4.1-rc.2
LABEL org.opencontainers.image.title "Official The Lounge image"
LABEL org.opencontainers.image.description "Official Docker image for The Lounge, a modern web IRC client designed for self-hosting."
@ -27,7 +28,7 @@ COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
# Install thelounge.
RUN apk --update --no-cache --virtual build-deps add python3 build-base git && \
ln -sf python3 /usr/bin/python && \
yarn --non-interactive --frozen-lockfile global add thelounge@${THELOUNGE_VERSION} && \
yarn --non-interactive --frozen-lockfile global add ${THELOUNGE_REPOSITORY}#${THELOUNGE_VERSION} && \
yarn --non-interactive cache clean && \
apk del --purge build-deps && \
rm -rf /root/.cache /tmp /usr/bin/python

View file

@ -1,9 +0,0 @@
THELOUNGE_VERSION?=4.4.0
ORGANISATION?=thelounge
all: main
main:
docker build -t ${ORGANISATION}/thelounge:${THELOUNGE_VERSION} --build-arg THELOUNGE_VERSION=${THELOUNGE_VERSION} .
.PHONY: main

View file

@ -1,7 +1,8 @@
version: '2'
services:
thelounge:
image: ghcr.io/thelounge/thelounge:latest
build:
context: ./
container_name: thelounge
ports:
- "9000:9000"

25
renovate.json Normal file
View file

@ -0,0 +1,25 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"automerge": true,
"platformAutomerge": true,
"automergeType": "pr",
"commitBody": "Release-As: {{newVersion}}",
"enabledManagers": ["regex"],
"regexManagers": [
{
"fileMatch": ["Dockerfile"],
"matchStrings": [
"THELOUNGE_VERSION\\??=(?<currentValue>[^\\s]+)"
],
"datasourceTemplate": "npm",
"packageNameTemplate": "thelounge",
"depNameTemplate": "thelounge"
}
],
"packageRules": [
{
"matchPackageNames": ["thelounge"],
"ignoreUnstable": false
}
]
}