Skip to content

Add test to cover multiple processes #148

Add test to cover multiple processes

Add test to cover multiple processes #148

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
test:
strategy:
fail-fast: false
matrix:
platform:
- ballerina
- buildpack
- go
- java
- lua
- nodejs
- perl
- php
- python
- ruby
- scratch
- static
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: run tests
run: make test platform=${{ matrix.platform }}
shell: bash
publish:
if: github.repository == 'tsuru/platforms' && github.event_name != 'pull_request'
needs: test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- ballerina
- buildpack
- go
- java
- lua
- nodejs
- perl
- php
- python
- ruby
- scratch
- static
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- run: |
ref="${GITHUB_REF##*/}"
img="tsuru/${{ matrix.platform }}"
tags="${img}:${ref}"
if [[ ${ref} == "master" ]] || [[ ${ref} == "main" ]]; then
tags="${img}:latest"
elif [[ ${ref} =~ ${{ matrix.platform }}-([0-9.]+) ]]; then
tags=${img}:${BASH_REMATCH[1]},${img}:latest
fi
echo "::set-output name=tag::${tags}"
if: github.event_name != 'pull_request'
id: tags
shell: bash
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: docker/build-push-action@v5
if: github.event_name != 'pull_request' && steps.tags.outputs.tag != ''
with:
context: ./${{ matrix.platform }}
push: true
tags: ${{ steps.tags.outputs.tag }}
platforms: linux/amd64