mirror of
https://github.com/sablierapp/sablier.git
synced 2025-12-26 23:21:38 +01:00
Ghcr was mostly used, switched to docker registry in order to have a consistent documentation
83 lines
1.9 KiB
YAML
83 lines
1.9 KiB
YAML
name: Build Sablier plugins
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- develop
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
name: Build docker image once and share it to E2E jobs
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile
|
|
tags: acouvreur/sablier:local
|
|
outputs: type=docker,dest=/tmp/sablier.tar
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: sablier-image-tar
|
|
path: /tmp/sablier.tar
|
|
|
|
traefik:
|
|
name: Build Sablier for Traefik middleware
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Set up Go 1.18
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.18
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Build
|
|
run: cd plugins/traefik && go build -v .
|
|
|
|
- name: Test
|
|
run: cd plugins/traefik && go test -v ./...
|
|
|
|
traefik_e2e:
|
|
name: Run Sablier E2E tests for Traefik middleware
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
provider: [docker_classic, docker_swarm, kubernetes]
|
|
steps:
|
|
- name: Set up Go 1.18
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.18
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
|
|
- name: Download artifact
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: sablier-image-tar
|
|
path: /tmp
|
|
|
|
- name: Load Docker image
|
|
run: docker load --input /tmp/sablier.tar
|
|
|
|
- name: Test ${{ matrix.provider }}
|
|
run: cd plugins/traefik/e2e && bash ./${{ matrix.provider }}.sh |