Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix preview #406

Merged
merged 2 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
name: preview deployment
name: Preview Deployment

on:
workflow_run:
workflows: ["docker image"]
workflows: ["Development Image"]
types:
- completed

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
group: ${{ github.workflow }}
cancel-in-progress: true

jobs:
deployment:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
Expand All @@ -20,7 +23,7 @@ jobs:
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
color: "#6848a9"
message: "Deployment started."
message: Deployment ${{ github.ref_name }} started
- name: ssh
uses: appleboy/ssh-action@master
with:
Expand All @@ -35,4 +38,4 @@ jobs:
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
color: "#6848a9"
message: "Deployment complete."
message: Deployment ${{ github.ref_name }} complete
16 changes: 11 additions & 5 deletions .github/workflows/publish-tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Release Image
on:
push:
tags:
- "v*"
- "[0-9]*"

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -27,13 +27,18 @@ jobs:
cd neodb-takahe
echo "takahe=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Overwrite version in code
env:
REF_NAME: ${{ github.ref_name }}
run: echo '__version__ = "'$REF_NAME'"' > boofilsic/__init__.py

- name: Send Discord notification
uses: appleboy/discord-action@master
with:
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
color: "#1857a4"
message: Building release image ${{ steps.version.outputs.neodb }}-${{ steps.version.outputs.takahe }}
message: Building release image ${{ github.ref_name }}-${{ steps.version.outputs.neodb }}-${{ steps.version.outputs.takahe }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand All @@ -48,8 +53,9 @@ jobs:
images: neodb/neodb
tags: |
type=raw,value=latest
type=semver,pattern={{version}}
type=raw,value=${{ steps.version.outputs.neodb }}-${{ steps.version.outputs.takahe }}
type=pep440,pattern={{version}}
type=pep440,pattern={{major}}.{{minor}}
# type=raw,value=${{ steps.version.outputs.version }}-${{ steps.version.outputs.neodb }}-${{ steps.version.outputs.takahe }}

- name: Login to DockerHub
if: github.event_name != 'pull_request'
Expand All @@ -73,4 +79,4 @@ jobs:
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
color: "#1857a4"
message: Published release image ${{ steps.version.outputs.neodb }}-${{ steps.version.outputs.takahe }}
message: Published release image ${{ github.ref_name }}-${{ steps.version.outputs.neodb }}-${{ steps.version.outputs.takahe }}
9 changes: 7 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,18 @@ jobs:
cd neodb-takahe
echo "takahe=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT

- name: Overwrite version in code
env:
REF_NAME: ${{ github.ref_name }}
run: echo '__version__ = "'$REF_NAME'"' > boofilsic/__init__.py

- name: Send Discord notification
uses: appleboy/discord-action@master
with:
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
color: "#1857a4"
message: Building development image ${{ steps.version.outputs.neodb }}-${{ steps.version.outputs.takahe }}
message: Building development image ${{ github.ref_name }}-${{ steps.version.outputs.neodb }}-${{ steps.version.outputs.takahe }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down Expand Up @@ -75,4 +80,4 @@ jobs:
webhook_id: ${{ secrets.DISCORD_WEBHOOK_ID }}
webhook_token: ${{ secrets.DISCORD_WEBHOOK_TOKEN }}
color: "#1857a4"
message: Published development image ${{ steps.version.outputs.neodb }}-${{ steps.version.outputs.takahe }}
message: Published development image ${{ github.ref_name }}-${{ steps.version.outputs.neodb }}-${{ steps.version.outputs.takahe }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
![](https://github.com/neodb-social/neodb/actions/workflows/check.yml/badge.svg?branch=main)
![](https://github.com/neodb-social/neodb/actions/workflows/tests.yml/badge.svg?branch=main)
![](https://github.com/neodb-social/neodb/actions/workflows/publish.yml/badge.svg?branch=main)
![](https://github.com/neodb-social/neodb/actions/workflows/publish-tags.yml/badge.svg)

NeoDB (fka boofilsic) is an open source project and free service to help users manage, share and discover collections, reviews and ratings for culture products (e.g. books, movies, music, podcasts, games and performances) in Fediverse.

Expand Down
2 changes: 1 addition & 1 deletion boofilsic/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.9.0"
__version__ = "dev"