Skip to content

Commit

Permalink
feat: upgrade all actions
Browse files Browse the repository at this point in the history
  • Loading branch information
kirinnee committed Feb 25, 2024
1 parent b9967d7 commit 63c94c4
Show file tree
Hide file tree
Showing 6 changed files with 348 additions and 132 deletions.
64 changes: 42 additions & 22 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,37 +24,48 @@ env:
jobs:
precommit:
name: Pre-commit Check
runs-on: ubuntu-22.04
runs-on:
- nscloud-ubuntu-22.04-amd64-4x8-with-cache
- nscloud-cache-size-50gb
- nscloud-cache-tag-sulfone-zinc-nix-store-cache
- nscloud-git-mirror-1gb
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
# Setup
- uses: AtomiCloud/actions.setup-nix@v1.1.0
- uses: AtomiCloud/actions.cache-nuget@v1.0.1

# Action
- name: Run pre-commit
run: nix develop .#ci -c ./scripts/ci/pre-commit.sh
build:
name: Build Docker
permissions:
contents: read
id-token: write
packages: write
runs-on: ubuntu-22.04
strategy:
matrix:
configs:
- image-name: api-amd
- image-name: api
dockerfile: ./infra/Dockerfile
context: .
platform: linux/amd64
- image-name: migrate-amd
platform: linux/amd64,linux/arm64
- image-name: migrate
dockerfile: ./infra/migrate.Dockerfile
context: .
platform: linux/amd64
platform: linux/amd64,linux/arm64
env:
STRAT_DOCKER_IMAGE: ${{ matrix.configs.image-name }}
STRAT_DOCKERFILE: ${{ matrix.configs.dockerfile }}
STRAT_DOCKER_CONTEXT: ${{ matrix.configs.context }}
STRAT_DOCKER_PLATFORM: ${{ matrix.configs.platform }}
steps:
- uses: actions/checkout@v4
# Setup
- uses: AtomiCloud/actions.setup-docker@v1.2.0

# Action
- uses: rlespinasse/github-slug-action@v3.x
- uses: docker/setup-buildx-action@v3
- uses: docker/setup-qemu-action@v3
- name: Build and Push Docker
run: ./scripts/ci/ci-docker.sh
env:
Expand Down Expand Up @@ -83,13 +94,17 @@ jobs:
publish:
name: Publish Helm
needs: build
runs-on: ubuntu-22.04
runs-on:
- nscloud-ubuntu-22.04-amd64-4x8-with-cache
- nscloud-cache-size-50gb
- nscloud-cache-tag-sulfone-zinc-nix-store-cache
- nscloud-git-mirror-1gb
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: rlespinasse/github-slug-action@v3.x
# Setup
- uses: AtomiCloud/actions.setup-nix@v1.1.0

# Action
- uses: rlespinasse/github-slug-action@v3.x
- name: Publish
env:
GITHUB_REPO_REF: ${{ github.repository }}
Expand All @@ -106,16 +121,21 @@ jobs:
release:
name: Semantic Release
needs:
- publish
- build
- precommit
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
runs-on:
- nscloud-ubuntu-22.04-amd64-4x8-with-cache
- nscloud-cache-size-50gb
- nscloud-cache-tag-releaser-sulfone-zinc-nix-store-cache
- nscloud-git-mirror-1gb
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: rlespinasse/github-slug-action@v3.x
# Setup
- uses: AtomiCloud/actions.setup-nix@v1.1.0
- uses: AtomiCloud/actions.cache-npm@v1.0.1

# Action
- uses: rlespinasse/github-slug-action@v3.x
- name: Release
env:
GITHUB_REPO_REF: ${{ github.repository }}
Expand Down
Loading

0 comments on commit 63c94c4

Please sign in to comment.