Skip to content

Build compilation testing image #3

Build compilation testing image

Build compilation testing image #3

name: Build compilation testing image
# This is a manual trigger.
on: [workflow_dispatch]
jobs:
build-compilation-testing-image:
# Run all steps in the compilation testing containers
strategy:
matrix:
os: [anolis8.6, ubuntu20.04]
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
# Because "Build and push" step `context` field can't be subdir,
# we need to copy files needed by dockerfile to root dir of the project
- name: Copy context for docker build
run: |
cp -r .github/workflows/docker .
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.TEST_DOCKER_USERNAME }}
password: ${{ secrets.TEST_DOCKER_PASSWORD }}
- name: Build and push the image
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/Dockerfile-compilation-testing-${{ matrix.os }}
platforms: linux/amd64
push: true
tags: runetest/compilation-testing:${{ matrix.os }}