mirror of
https://github.com/valitydev/image-service-erlang.git
synced 2024-11-06 08:15:21 +00:00
b634290415
* Use http protocol for build_utils submodule * Update to rbkmoney/build_utils@29cb2775 * Switch to utils' targets usage for image building * Add github actions * Fix submodule target * Remove double SERVICE_IMAGE_TAG definig * Fix build-utils
44 lines
1.2 KiB
YAML
44 lines
1.2 KiB
YAML
name: Pull Request Check
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
test-build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout source code
|
|
uses: actions/checkout@v2
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
- name: Cache Docker layers
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: /tmp/.buildx-cache
|
|
key: ${{ runner.os }}-buildx-${{ hashFiles('Dockerfile.sh', 'Makefile') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-buildx-
|
|
- name: Initialize build-utils
|
|
run: make submodules
|
|
- name: Build image
|
|
run: make build_image
|
|
env:
|
|
ORG_NAME: ${{ github.repository_owner }}
|
|
REGISTRY: ghcr.io
|
|
DOCKER: docker buildx
|
|
DOCKER_BUILD_OPTIONS: >-
|
|
--cache-to type=local,dest=/tmp/.buildx-cache-new
|
|
--cache-from type=local,src=/tmp/.buildx-cache
|
|
--platform linux/amd64
|
|
- name: Move cache
|
|
# Work-around to remove old layers
|
|
# https://github.com/docker/build-push-action/issues/252
|
|
# https://github.com/moby/buildkit/issues/1896
|
|
run: |
|
|
rm -rf /tmp/.buildx-cache
|
|
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|