refactor: use MEMORY type cache #92
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Cache register | |
uses: actions/cache@v2 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }} | |
- name: Build Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: ./ | |
file: ./scripts/setup_and_run_rebar3_ct_in_docker/Dockerfile.ubuntu22.04 | |
builder: ${{ steps.buildx.outputs.name }} | |
load: true | |
tags: sasl_auth_dockerfile.ubuntu22.04 | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
# This ugly bit is necessary if you don't want your cache to grow forever | |
# till it hits GitHub's limit of 5GB. | |
# Temp fix | |
# https://github.com/docker/build-push-action/issues/252 | |
# https://github.com/moby/buildkit/issues/1896 | |
- name: Move cache | |
run: | | |
rm -rf /tmp/.buildx-cache | |
mv /tmp/.buildx-cache-new /tmp/.buildx-cache | |
- name: Run tests | |
run: (cd ${GITHUB_WORKSPACE} && ./scripts/setup_and_run_rebar3_ct_in_docker/run_in_docker.sh) |