fork/static-web-server
git clone https://git.julia.blue/fork/static-web-server
1c4929d
allow-symlink
1name : release-docker 2on : 3release : 4types : 5- published 6 7jobs : 8docker-image-alpine : 9runs-on : ubuntu-22.04 10if : contains(github.ref, 'v2.') 11steps : 12- 13name : Checkout repository 14uses : actions/checkout@v4 15with : 16fetch-depth : 1 17- 18name : Set up QEMU 19uses : docker/setup-qemu-action@v3 20- 21name : Docker meta alpine 22id : meta_alpine 23uses : docker/metadata-action@v5 24with : 25images : | 26joseluisq/static-web-server 27ghcr.io/static-web-server/static-web-server 28flavor : | 29latest=false 30suffix=-alpine 31tags : | 32type=semver,pattern={{version}} 33type=semver,pattern={{major}}.{{minor}} 34type=semver,pattern={{major}} 35- 36name : Set up Docker Buildx 37uses : docker/setup-buildx-action@v3 38- 39name : Login to DockerHub 40uses : docker/login-action@v3 41with : 42username : ${{ secrets.DOCKERHUB_USERNAME }} 43password : ${{ secrets.DOCKERHUB_TOKEN }} 44- 45name : Login to ghcr.io 46uses : docker/login-action@v3 47with : 48registry : ghcr.io 49username : ${{ github.actor }} 50password : ${{ secrets.GITHUB_TOKEN }} 51- 52name : Prepare Docker envs 53shell : bash 54run : | 55echo "SERVER_VERSION=${GITHUB_REF##*/v}" >> $GITHUB_ENV 56- 57name : Build and push (alpine) 58uses : docker/build-push-action@v6 59with : 60push : true 61context : . 62platforms : linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 63file : ./docker/alpine/Dockerfile 64tags : ${{ steps.meta_alpine.outputs.tags }} 65build-args : | 66SERVER_VERSION=${{ env.SERVER_VERSION }} 67 68docker-image-debian : 69needs : [ 'docker-image-alpine' ] 70runs-on : ubuntu-22.04 71if : contains(github.ref, 'v2.') 72steps : 73- 74name : Checkout repository 75uses : actions/checkout@v4 76with : 77fetch-depth : 1 78- 79name : Set up QEMU 80uses : docker/setup-qemu-action@v3 81- 82name : Docker meta debian 83id : meta_debian 84uses : docker/metadata-action@v5 85with : 86images : | 87joseluisq/static-web-server 88ghcr.io/static-web-server/static-web-server 89flavor : | 90latest=false 91suffix=-debian 92tags : | 93type=semver,pattern={{version}} 94type=semver,pattern={{major}}.{{minor}} 95type=semver,pattern={{major}} 96- 97name : Set up Docker Buildx 98uses : docker/setup-buildx-action@v3 99- 100name : Login to DockerHub 101uses : docker/login-action@v3 102with : 103username : ${{ secrets.DOCKERHUB_USERNAME }} 104password : ${{ secrets.DOCKERHUB_TOKEN }} 105- 106name : Login to ghcr.io 107uses : docker/login-action@v3 108with : 109registry : ghcr.io 110username : ${{ github.actor }} 111password : ${{ secrets.GITHUB_TOKEN }} 112- 113name : Prepare Docker envs 114shell : bash 115run : | 116echo "SERVER_VERSION=${GITHUB_REF##*/v}" >> $GITHUB_ENV 117- 118name : Build and push (debian) 119uses : docker/build-push-action@v6 120with : 121push : true 122context : . 123platforms : linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6,linux/ppc64le,linux/s390x 124file : ./docker/debian/Dockerfile 125tags : ${{ steps.meta_debian.outputs.tags }} 126build-args : | 127SERVER_VERSION=${{ env.SERVER_VERSION }} 128 129docker-image-scratch : 130needs : [ 'docker-image-alpine' ] 131runs-on : ubuntu-22.04 132steps : 133- 134name : Checkout repository 135uses : actions/checkout@v4 136with : 137fetch-depth : 1 138- 139name : Set up QEMU 140uses : docker/setup-qemu-action@v3 141- 142name : Docker meta scratch 143id : meta_scratch 144uses : docker/metadata-action@v5 145with : 146images : | 147joseluisq/static-web-server 148ghcr.io/static-web-server/static-web-server 149tags : | 150type=semver,pattern={{version}} 151type=semver,pattern={{major}}.{{minor}} 152type=semver,pattern={{major}} 153- 154name : Set up Docker Buildx 155uses : docker/setup-buildx-action@v3 156- 157name : Login to DockerHub 158uses : docker/login-action@v3 159with : 160username : ${{ secrets.DOCKERHUB_USERNAME }} 161password : ${{ secrets.DOCKERHUB_TOKEN }} 162- 163name : Login to ghcr.io 164uses : docker/login-action@v3 165with : 166registry : ghcr.io 167username : ${{ github.actor }} 168password : ${{ secrets.GITHUB_TOKEN }} 169- 170name : Prepare Docker envs 171shell : bash 172run : | 173echo "SERVER_VERSION=${GITHUB_REF##*/v}" >> $GITHUB_ENV 174- 175name : Build and push (scratch) 176uses : docker/build-push-action@v6 177with : 178push : true 179context : . 180platforms : linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6 181file : ./docker/scratch/Dockerfile 182tags : ${{ steps.meta_scratch.outputs.tags }} 183build-args : | 184 SERVER_VERSION=${{ env.SERVER_VERSION }}