Skip to content

Commit

Permalink
Fix actions
Browse files Browse the repository at this point in the history
  • Loading branch information
pbzweihander committed Nov 29, 2023
1 parent 098dac5 commit 331a354
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 80 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/backend-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ run-name: "Backend: lint"
on:
push:
branches:
- main
- main
pull_request:

jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --no-deps --all-targets -- -D warnings
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --no-deps --all-targets -- -D warnings
24 changes: 12 additions & 12 deletions .github/workflows/backend-rustfmt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ run-name: "Backend: format"
on:
push:
branches:
- main
- main
pull_request:

jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
- name: Check rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
- name: Check rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
55 changes: 27 additions & 28 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,37 @@ run-name: "Docker: build"
on:
push:
branches:
- main
- main
tags:
- v*
- v*
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: docker/setup-qemu-action@v2
if: github.event_name != 'pull_request'
- uses: docker/setup-buildx-action@v2
- uses: docker/metadata-action@v4
id: meta
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=edge,branch=main
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=pr
flavor:
latest=auto
- uses: actions/checkout@v3
- uses: docker/build-push-action@v4
with:
context: .
platforms: ${{ github.event_name == 'pull_request' && 'linux/amd64' || 'linux/amd64,linux/arm64' }}
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
cache-to: type=gha,scope=docker
cache-from: type=gha,scope=docker,mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- uses: docker/setup-qemu-action@v2
if: github.event_name != 'pull_request'
- uses: docker/setup-buildx-action@v2
- uses: docker/metadata-action@v4
id: meta
with:
images: |
ghcr.io/${{ github.repository }}
tags: |
type=edge,branch=main
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=pr
flavor: latest=auto
- uses: actions/checkout@v3
- uses: docker/build-push-action@v4
with:
context: .
platforms: ${{ github.event_name == 'pull_request' && 'linux/amd64' || 'linux/amd64,linux/arm64' }}
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
cache-to: type=gha,scope=docker
cache-from: type=gha,scope=docker,mode=max
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
28 changes: 14 additions & 14 deletions .github/workflows/frontend-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@ run-name: "Frontend: build"
on:
push:
branches:
- main
- main
pull_request:

jobs:
build:
runs-on: ubuntu-latest
container: node:20
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: frontend/.yarn/cache
key: frontend-yarn-${{ runner.os }}-${{ hashFiles('frontend/yarn.lock') }}
restore-keys: |
frontend-yarn-${{ runner.os }}-
- name: Install dependencies
working-directory: frontend
run: yarn --immutable
- name: Build
working-directory: frontend
run: yarn build
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: frontend/.yarn/cache
key: frontend-yarn-${{ runner.os }}-${{ hashFiles('frontend/yarn.lock') }}
restore-keys: |
frontend-yarn-${{ runner.os }}-
- name: Install dependencies
working-directory: frontend
run: yarn --immutable
- name: Build
working-directory: frontend
run: yarn build
28 changes: 14 additions & 14 deletions .github/workflows/frontend-format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@ run-name: "Frontend: format"
on:
push:
branches:
- main
- main
pull_request:

jobs:
format:
runs-on: ubuntu-latest
container: node:20
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: frontend/.yarn/cache
key: frontend-yarn-${{ runner.os }}-${{ hashFiles('frontend/yarn.lock') }}
restore-keys: |
frontend-yarn-${{ runner.os }}-
- name: Install dependencies
working-directory: frontend
run: yarn --immutable
- name: Check formatting
working-directory: frontend
run: yarn fmt:check
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: frontend/.yarn/cache
key: frontend-yarn-${{ runner.os }}-${{ hashFiles('frontend/yarn.lock') }}
restore-keys: |
frontend-yarn-${{ runner.os }}-
- name: Install dependencies
working-directory: frontend
run: yarn --immutable
- name: Check formatting
working-directory: frontend
run: yarn prettier:check

0 comments on commit 331a354

Please sign in to comment.