mirror of
https://github.com/urbit/shrub.git
synced 2024-12-23 02:41:35 +03:00
a64e0e141e
d3c5aa74c1
introduced a Docker image intended for deploying Urbit ships
This commit modifies the build.yml GitHub Actions workflow to build the
docker image as part of the push/PR workflow, and adds a
`release-docker.yml` workflow, which runs on any tag push `urbit-v*` and
pushes the image to Docker Hub, also synchronizing the README.
Co-authored-by: Josh Lehman <josh@urbit.org>
44 lines
1.4 KiB
YAML
44 lines
1.4 KiB
YAML
name: release-docker
|
|
|
|
on:
|
|
release: null
|
|
push:
|
|
tags: ['urbit-v*']
|
|
|
|
jobs:
|
|
upload:
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- { os: ubuntu-latest, system: x86_64-linux }
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: cachix/install-nix-action@v12
|
|
with:
|
|
extra_nix_config: |
|
|
system-features = nixos-test benchmark big-parallel kvm
|
|
- uses: cachix/cachix-action@v8
|
|
with:
|
|
name: ${{ secrets.CACHIX_NAME }}
|
|
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
|
- uses: docker/docker-login-action@v1.8.0
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
- uses: christian-korneck/update-container-description-action@v1
|
|
env:
|
|
DOCKER_USER: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
DOCKER_PASS: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
with:
|
|
destination_container_repo: ${{ secrets.DOCKERHUB_USERNAME }}/urbit
|
|
provider: dockerhub
|
|
short_description: 'Urbit: a clean-slate OS and network for the 21st century'
|
|
readme_file: 'pkg/docker-image/README.md'
|
|
|
|
- run: |
|
|
version="$(cat ./pkg/urbit/version)"
|
|
$(nix-build -A skopeo)/bin/skopeo --insecure-policy copy tarball:$(nix-build -A docker-image) docker://${{ secrets.DOCKERHUB_USERNAME }}/urbit:v$version
|