fork/static-web-server

git clone https://git.julia.blue/fork/static-web-server

Jose Quintanarefactor: update github ci workflows (#514)1c4929d

allow-symlink
2.2 KiB75 linesraw
1name: release-docker-manual
2on:
3  pull_request:
4    types:
5      - labeled
6    paths:
7      - docker/**/Dockerfile
8      - scripts/ci/**/*.sh
9      - .github/workflows/release.docker.manual.yml
10
11jobs:
12  docker-image-debian:
13    runs-on: ubuntu-22.04
14    environment: docker-publish-manual  
15    if: contains(github.event.label.name, 'docker:publish:v2.')
16    steps:
17      -
18        name: Checkout repository
19        uses: actions/checkout@v4
20        with:
21          fetch-depth: 1
22      -
23        name: Set up QEMU
24        uses: docker/setup-qemu-action@v3
25      -
26        name: Prepare Docker envs
27        shell: bash
28        run: |
29          version=${{ github.event.label.name }}
30          semver=${version#*docker:publish:v}
31          echo "SEMVER=$semver" >> $GITHUB_ENV
32          echo "SEMVER_MAJOR=${semver%.*.*}" >> $GITHUB_ENV
33          echo "SEMVER_MINOR=${semver%.*}" >> $GITHUB_ENV
34      -
35        name: Docker meta debian
36        id: meta_debian
37        uses: docker/metadata-action@v5
38        with:
39          images: |
40            joseluisq/static-web-server
41            ghcr.io/static-web-server/static-web-server
42          flavor: |
43            latest=false
44          tags: |
45            type=raw,value=debian
46            type=raw,value=${{ env.SEMVER }}-debian
47            type=raw,value=${{ env.SEMVER_MAJOR }}-debian
48            type=raw,value=${{ env.SEMVER_MINOR }}-debian
49      -
50        name: Set up Docker Buildx
51        uses: docker/setup-buildx-action@v3
52      -
53        name: Login to DockerHub
54        uses: docker/login-action@v3
55        with:
56          username: ${{ secrets.DOCKERHUB_USERNAME }}
57          password: ${{ secrets.DOCKERHUB_TOKEN }}
58      -
59        name: Login to ghcr.io
60        uses: docker/login-action@v3
61        with:
62          registry: ghcr.io
63          username: ${{ github.actor }}
64          password: ${{ secrets.GITHUB_TOKEN }}
65      -
66        name: Build and push (debian)
67        uses: docker/build-push-action@v6
68        with:
69          push: true
70          context: .
71          platforms: linux/amd64,linux/arm64,linux/386,linux/arm/v7,linux/arm/v6,linux/ppc64le,linux/s390x
72          file: ./docker/debian/Dockerfile
73          tags: ${{ steps.meta_debian.outputs.tags }}
74          build-args: |
75            SERVER_VERSION=${{ env.SEMVER }}