mirror of
https://codeberg.org/demostf/frontend.git
synced 2026-06-03 18:24:12 +02:00
35 lines
No EOL
1,019 B
YAML
35 lines
No EOL
1,019 B
YAML
name: "CI"
|
|
on:
|
|
pull_request:
|
|
push:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: cachix/install-nix-action@v20
|
|
- uses: icewind1991/attic-action@v1
|
|
with:
|
|
name: ci
|
|
instance: https://cache.icewind.me
|
|
authToken: '${{ secrets.ATTIC_TOKEN }}'
|
|
- run: nix build .#frontend
|
|
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
- uses: cachix/install-nix-action@v20
|
|
- uses: icewind1991/attic-action@v1
|
|
with:
|
|
name: ci
|
|
instance: https://cache.icewind.me
|
|
authToken: '${{ secrets.ATTIC_TOKEN }}'
|
|
- run: nix build .#docker
|
|
- name: Push image
|
|
if: github.ref == 'refs/heads/main'
|
|
run: |
|
|
skopeo copy --dest-creds="${{ secrets.DOCKERHUB_USERNAME }}:${{ secrets.DOCKERHUB_TOKEN }}" "docker-archive:$(nix build .#docker --print-out-paths)" "docker://demostf/frontend" |