mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-02 21:29:12 -04:00
ci: Synchronize GitHub workflows with develop
branch
This commit is contained in:
parent
d97537d18b
commit
c85ab49444
12 changed files with 832 additions and 686 deletions
74
.github/workflows/docker.yml
vendored
Normal file
74
.github/workflows/docker.yml
vendored
Normal file
|
@ -0,0 +1,74 @@
|
|||
name: Docker
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- 'develop'
|
||||
tags:
|
||||
- 'v?[0-9]+.[0-9]+.[0-9]+'
|
||||
env:
|
||||
TEST_TAG: etherpad/etherpad:test
|
||||
jobs:
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
-
|
||||
name: Check out
|
||||
uses: actions/checkout@v2
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
-
|
||||
name: Build and export to Docker
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
load: true
|
||||
tags: ${{ env.TEST_TAG }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
-
|
||||
name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 'lts/*'
|
||||
cache: 'npm'
|
||||
cache-dependency-path: |
|
||||
src/package-lock.json
|
||||
src/bin/doc/package-lock.json
|
||||
-
|
||||
name: Test
|
||||
run: |
|
||||
docker run --rm -d -p 9001:9001 ${{ env.TEST_TAG }}
|
||||
./src/bin/installDeps.sh
|
||||
sleep 3
|
||||
(cd src && npm run test-container)
|
||||
git clean -dxf .
|
||||
-
|
||||
name: Docker meta
|
||||
if: github.event_name == 'push'
|
||||
id: meta
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
images: etherpad/etherpad
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=semver,pattern={{major}}
|
||||
-
|
||||
name: Log in to Docker Hub
|
||||
if: github.event_name == 'push'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
-
|
||||
name: Build and push
|
||||
if: github.event_name == 'push'
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
Loading…
Add table
Add a link
Reference in a new issue