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

[OPS-1448] Replace buildkite with github actions #134

Merged
merged 1 commit into from
Oct 9, 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
32 changes: 0 additions & 32 deletions .buildkite/pipeline.yml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# © 2019-2023 Serokell <[email protected]>
# © 2019-2023 Lars Jellema <[email protected]>
#
# SPDX-License-Identifier: MPL-2.0

name: CI
on:
pull_request:
push:
branches:
- master

env:
CDN_DISTRIBUTION_ID: E13UN1J1JFIWUZ
CDN_BUCKET: s3://nixfmt.serokell.io

jobs:
check:
runs-on: [self-hosted, nix]
steps:
- uses: actions/checkout@v3

- name: reuse lint
run: nix shell .#packages.x86_64-linux.reuse -c reuse lint

# - name: hlint
# run: nix build -L .#checks.x86_64-linux.hlint
# if: success() || failure()

# - name: stylish-haskell
# run: nix build -L .#checks.x86_64-linux.stylish-haskell
# if: success() || failure()

- name: build nixfmt
run: nix build -L .#nixfmt-static
if: success() || failure()

- name: build webdemo
run: nix build -L .#nixfmt-webdemo
if: success() || failure()

- name: build awscli
run: nix shell .#awscli
if: success() || failure()

deploy:
runs-on: [self-hosted, nix]
if: ${{ github.ref == 'refs/heads/master' }}
steps:
- uses: actions/checkout@v3

- name: deploy webdemo
run: |
nix build .#nixfmt-webdemo
nix shell .#awscli -c aws s3 cp --recursive result/ "$CDN_BUCKET"
# delete files that don't exist anymore, use `--size-only` so behavior won't depend on local file timestamps
nix shell .#awscli -c aws s3 sync --delete --size-only result/ "$CDN_BUCKET"
nix shell .#awscli -c aws cloudfront create-invalidation --distribution-id "$CDN_DISTRIBUTION_ID" --paths '/*'
Loading