This repository has been archived by the owner on Sep 18, 2024. It is now read-only.
deps(flake): update inputs #64
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
packages: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: cachix/install-nix-action@v25 | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- run: | | |
nix build .#workerd-docker | |
readlink result | xargs -I {} cp {} workerd.tar.gz | |
- name: upload docker image | |
uses: actions/upload-artifact@v4 | |
with: | |
name: container | |
path: workerd.tar.gz | |
upload-to-docker: | |
runs-on: ubuntu-latest | |
needs: build | |
if: github.ref == 'refs/heads/main' | |
env: | |
REGISTRY: ghcr.io | |
steps: | |
- name: download docker image | |
uses: actions/download-artifact@v4 | |
with: | |
name: container | |
- name: login to ${{ env.REGISTRY }} | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: "getchoo" | |
password: ${{ github.token }} | |
- name: upload to ${{ env.REGISTRY }} | |
run: | | |
docker load < workerd.tar.gz | |
docker tag workerd:latest ${{ env.REGISTRY }}/getchoo/workerd:latest | |
docker push ${{ env.REGISTRY }}/getchoo/workerd:latest |