Skip to content

Commit

Permalink
Merge branch 'release/v0.12.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ja573 committed Mar 14, 2024
2 parents 5b0b0b7 + 93cdb66 commit 1f17fc8
Show file tree
Hide file tree
Showing 37 changed files with 226 additions and 1,202 deletions.
39 changes: 11 additions & 28 deletions .github/workflows/build_test_and_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,41 +32,24 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build binary
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose
- uses: actions/checkout@v4
- name: Build binary
run: cargo build --verbose
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --verbose
- uses: actions/checkout@v4
- name: Run tests
run: cargo test --workspace --verbose
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run linting
uses: actions-rs/cargo@v1
with:
command: clippy
args: --all --all-targets --all-features -- -D warnings
- uses: actions/checkout@v4
- name: Run linting
run: cargo clippy --all --all-targets --all-features -- -D warnings
format_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
override: true
- uses: actions/checkout@v4
- name: Run format
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check
30 changes: 0 additions & 30 deletions .github/workflows/docker_build.yml

This file was deleted.

40 changes: 29 additions & 11 deletions .github/workflows/docker_build_and_push_to_dockerhub.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
name: publish-to-dockerhub

on:
release:
types: [published]
pull_request:
workflow_dispatch:

jobs:
build_and_push_docker_image:
build_and_push_staging_docker_image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
Expand All @@ -19,21 +19,19 @@ jobs:
openbookpublishers/thoth
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=pr,prefix=staging-pr-
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
Expand All @@ -43,3 +41,23 @@ jobs:
THOTH_EXPORT_API=https://export.thoth.pub
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

build_dev_docker_image:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
id: docker_build
uses: docker/build-push-action@v5
with:
push: false
tags: openbookpublishers/thoth:latest
file: Dockerfile.dev
build-args: |
THOTH_GRAPHQL_API=https://api.thoth.pub
THOTH_EXPORT_API=https://export.thoth.pub
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
45 changes: 45 additions & 0 deletions .github/workflows/docker_build_and_push_to_dockerhub_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: publish-to-dockerhub

on:
release:
types: [published]

jobs:
build_and_push_docker_image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
# list of Docker images to use as base name for tags
images: |
openbookpublishers/thoth
# generate Docker tags based on the following events/attributes
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
THOTH_GRAPHQL_API=https://api.thoth.pub
THOTH_EXPORT_API=https://export.thoth.pub
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
34 changes: 0 additions & 34 deletions .github/workflows/docker_build_dev.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/docker_build_dev_no_action.yml

This file was deleted.

12 changes: 0 additions & 12 deletions .github/workflows/docker_build_no_action.yml

This file was deleted.

23 changes: 7 additions & 16 deletions .github/workflows/run_migrations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,10 @@ jobs:
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- name: Build binary
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose
- name: Run migrations
uses: actions-rs/cargo@v1
with:
command: run
args: migrate
- name: Revert migrations
uses: actions-rs/cargo@v1
with:
command: run
args: migrate --revert
- uses: actions/checkout@v4
- name: Build binary
run: cargo build --verbose
- name: Run migrations
run: cargo run migrate
- name: Revert migrations
run: cargo run migrate --revert
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [[0.12.0]](https://github.com/thoth-pub/thoth/releases/tag/v0.12.0) - 2024-03-14
### Removed
- [549](https://github.com/thoth-pub/thoth/pull/549) - Deprecate public-facing pages in Thoth APP in favour of a separate, standalone, website

### Added
- [549](https://github.com/thoth-pub/thoth/pull/549) - Build and push staging docker images on pull requests

### Changed
- [549](https://github.com/thoth-pub/thoth/pull/549) - Upgrade GitHub actions dependencies (`docker/setup-qemu-action@v3`, `docker/setup-buildx-action@v3`, `docker/login-action@v3`, `docker/build-push-action@v5`, `actions/checkout@v4`, `actions/setup-node@v4`)

## [[0.11.18]](https://github.com/thoth-pub/thoth/releases/tag/v0.11.18) - 2024-03-07
### Added
- [441](https://github.com/thoth-pub/thoth/issues/441) - Implement ONIX 3.0 "Thoth" specification (i.e. complete record reflecting full data model)
Expand Down
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 1f17fc8

Please sign in to comment.