kopia lustrzana https://github.com/gaul/s3proxy
55 wiersze
1.5 KiB
YAML
55 wiersze
1.5 KiB
YAML
name: Run Tests
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
tags:
|
|
- '*'
|
|
pull_request:
|
|
branches:
|
|
- '*'
|
|
jobs:
|
|
runTests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: 'recursive'
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
- uses: actions/setup-java@v2
|
|
with:
|
|
distribution: 'temurin'
|
|
java-version: '11'
|
|
- name: Install dependencies
|
|
run: sudo apt-get install -y libevent-dev python3-pip python3-virtualenv
|
|
- name: Run Tests Tests
|
|
run: |
|
|
mvn package
|
|
./src/test/resources/run-s3-tests.sh
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v1
|
|
if: github.event_name != 'pull_request'
|
|
with:
|
|
username: ${{ secrets.DOCKER_USER }}
|
|
password: ${{ secrets.DOCKER_PASS }}
|
|
- name: Docker meta
|
|
id: meta
|
|
uses: docker/metadata-action@v3
|
|
with:
|
|
images: andrewgaul/s3proxy
|
|
tags: |
|
|
type=sha,event=branch
|
|
type=semver,pattern={{version}}
|
|
type=semver,pattern={{major}}.{{minor}}
|
|
type=semver,pattern={{major}}
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
context: .
|
|
platforms: linux/amd64,linux/arm64
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
tags: ${{ steps.meta.outputs.tags }}
|