aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/docker.yml70
-rw-r--r--.github/workflows/stats.yml2
-rw-r--r--.gitlab-ci.yml44
3 files changed, 71 insertions, 45 deletions
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
new file mode 100644
index 000000000..b4ff1a452
--- /dev/null
+++ b/.github/workflows/docker.yml
@@ -0,0 +1,70 @@
1name: Docker
2
3on:
4 push:
5 branches:
6 - 'master'
7 schedule:
8 - cron: '0 3 * * *'
9
10jobs:
11 generate-matrix:
12 name: Generate matrix for Docker build
13 runs-on: ubuntu-latest
14 outputs:
15 matrix: ${{ steps.set-matrix.outputs.matrix }}
16 steps:
17 - name: Checkout
18 uses: actions/checkout@v2
19 with:
20 ref: master
21 - name: Set matrix for build
22 id: set-matrix
23 run: |
24 # FIXME: https://github.com/actions/checkout/issues/290
25 git fetch --force --tags
26
27 one="{ \"file\": \"./support/docker/production/Dockerfile.bullseye\", \"ref\": \"develop\", \"tags\": \"chocobozzz/peertube-test:develop-bullseye\" }"
28 two="{ \"file\": \"./support/docker/production/Dockerfile.buster\", \"ref\": \"master\", \"tags\": \"chocobozzz/peertube-test:production-buster,chocobozzz/peertube-test:$(git describe --abbrev=0)-buster\" }"
29 three="{ \"file\": \"./support/docker/production/Dockerfile.nginx\", \"ref\": \"master\", \"tags\": \"chocobozzz/peertube-webserver-test:latest\" }"
30
31 matrix="[$one,$two,$three]"
32 echo ::set-output name=matrix::{\"include\":$(echo $matrix)}
33
34 docker:
35 runs-on: ubuntu-latest
36
37 needs: generate-matrix
38
39 strategy:
40 matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
41 fail-fast: false
42
43 steps:
44 -
45 name: Set up QEMU
46 uses: docker/setup-qemu-action@v1
47 -
48 name: Set up Docker Buildx
49 uses: docker/setup-buildx-action@v1
50 -
51 name: Login to DockerHub
52 uses: docker/login-action@v1
53 with:
54 username: ${{ secrets.DOCKERHUB_USERNAME }}
55 password: ${{ secrets.DOCKERHUB_TOKEN }}
56
57 -
58 name: Checkout develop
59 uses: actions/checkout@v2
60 with:
61 ref: ${{ matrix.ref }}
62 -
63 name: Docker build
64 uses: docker/build-push-action@v2
65 with:
66 context: '.'
67 platforms: linux/amd64,linux/arm64
68 push: true
69 file: ${{ matrix.file }}
70 tags: ${{ matrix.tags }}
diff --git a/.github/workflows/stats.yml b/.github/workflows/stats.yml
index d6213deed..e50c14720 100644
--- a/.github/workflows/stats.yml
+++ b/.github/workflows/stats.yml
@@ -1,4 +1,4 @@
1name: Stats" 1name: Stats
2 2
3on: 3on:
4 push: 4 push:
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index ad94c8cab..66c6df761 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -38,47 +38,3 @@ build-nightly:
38 - eval `ssh-agent -s` 38 - eval `ssh-agent -s`
39 - if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then ssh-add <(echo "${DEPLOYEMENT_KEY}"); fi 39 - if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then ssh-add <(echo "${DEPLOYEMENT_KEY}"); fi
40 - if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then scp ./peertube-nightly-* ${DEPLOYEMENT_USER}@${DEPLOYEMENT_HOST}:../../web/nightly; fi 40 - if [ ! -z ${DEPLOYEMENT_KEY+x} ]; then scp ./peertube-nightly-* ${DEPLOYEMENT_USER}@${DEPLOYEMENT_HOST}:../../web/nightly; fi
41
42.docker: &docker
43 stage: docker-nightly
44 cache: {}
45 image:
46 name: gcr.io/kaniko-project/executor:debug
47 entrypoint: [""]
48 before_script:
49 - mkdir -p /kaniko/.docker
50 - echo "{\"auths\":{\"$CI_REGISTRY\":{\"auth\":\"$CI_REGISTRY_AUTH\",\"email\":\"$CI_REGISTRY_EMAIL\"}}}" > /kaniko/.docker/config.json
51 script:
52 - /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $DOCKERFILE --destination $DOCKER_IMAGE_NAME
53
54build-docker-develop:
55 <<: *docker
56 only:
57 - schedules
58 variables:
59 DOCKER_IMAGE_NAME: chocobozzz/peertube:develop-bullseye
60 DOCKERFILE: $CI_PROJECT_DIR/support/docker/production/Dockerfile.bullseye
61
62build-docker-webserver:
63 <<: *docker
64 only:
65 - schedules
66 variables:
67 DOCKER_IMAGE_NAME: chocobozzz/peertube-webserver
68 DOCKERFILE: $CI_PROJECT_DIR/support/docker/production/Dockerfile.nginx
69
70build-docker-tag:
71 <<: *docker
72 only:
73 - tags
74 variables:
75 DOCKER_IMAGE_NAME: chocobozzz/peertube:$CI_COMMIT_TAG-bullseye
76 DOCKERFILE: $CI_PROJECT_DIR/support/docker/production/Dockerfile.bullseye
77
78build-docker-master:
79 <<: *docker
80 only:
81 - master
82 variables:
83 DOCKER_IMAGE_NAME: chocobozzz/peertube:production-bullseye
84 DOCKERFILE: $CI_PROJECT_DIR/support/docker/production/Dockerfile.bullseye