diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8db7502..703f82c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,4 +1,4 @@ -name: Create and publish a Docker image - Release +name: Release and build Docker image on: push: @@ -10,7 +10,32 @@ env: IMAGE_NAME: ${{ github.repository }} jobs: + + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: conventional Changelog Action + id: changelog + uses: TriPSs/conventional-changelog-action@v3 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + output-file: "false" + + - name: create release + uses: actions/create-release@v1 + if: ${{ steps.changelog.outputs.skipped == 'false' }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ steps.changelog.outputs.tag }} + release_name: ${{ steps.changelog.outputs.tag }} + body: ${{ steps.changelog.outputs.clean_changelog }} + build-and-push-image: + needs: release runs-on: ubuntu-latest permissions: contents: read @@ -40,26 +65,3 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - - changelog: - needs: build-and-push-image - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - - name: conventional Changelog Action - id: changelog - uses: TriPSs/conventional-changelog-action@v3.7.1 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: create release - uses: actions/create-release@v1 - if: ${{ steps.changelog.outputs.skipped == 'false' }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.changelog.outputs.tag }} - release_name: ${{ steps.changelog.outputs.tag }} - body: ${{ steps.changelog.outputs.clean_changelog }} diff --git a/.gitignore b/.gitignore index 7d1cf18..4cf3bc3 100644 --- a/.gitignore +++ b/.gitignore @@ -171,3 +171,4 @@ Session.vim # Auto-generated tag files tags +sqlite.db diff --git a/README.md b/README.md index a540e71..bb12b70 100644 --- a/README.md +++ b/README.md @@ -79,7 +79,7 @@ To initialize the database, run the server once with `--create_db`. ## Docker The provided dockerfile makes it easy to use the software as a docker -container. The latest state of the master branch can be found as a +container. The latest state of the master branch can be found as a [Automated build on the Docker hub](https://hub.docker.com/r/janlo/wallabag-kindle-consumer). You can easily configure the container via the environment variables from @@ -97,3 +97,4 @@ the wallabag server. ## License MIT + diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..4530275 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,28 @@ +version: "3.7" + +services: + + wallabag-kindle-consumer: + # TODO: Fork and tag releases. + image: ghcr.io/natilou/wallabag-kindle-consumer:master + container_name: wallabag-kindle-consumer + restart: unless-stopped + environment: + - DB_URI=sqlite:////data/sqlite.db + - DOMAIN=https://wallabag-kindle-consumer.local.adamantike.dev + - INTERFACE_HOST=0.0.0.0 + - SMTP_FROM=wallabag-kindle-consumer@adamantike.dev + - SMTP_HOST=postfix + - SMTP_PORT=587 + - SMTP_USER= + - SMTP_PASSWD= + # TODO: This is a custom variable added to avoid `smtp.starttls()` calls. Refactor code or fix postfix. + - SMTP_TLS=0 + - TAG=kindle + - WALLABAG_HOST=https://wallabag.local.adamantike.dev + - CLIENT_ID=7_3by9zusd5sao8ssow4g4c08k8gs4o4cw4o0cwkos0kowg0sc4k + - CLIENT_SECRET=38zxawyt05k4go08s8s8w4k0s4c8k004goc08s0gc8ooks4gsg + volumes: + - .:/data + ports: + - 8080:8080