Skip to content

Commit

Permalink
restructuring build to take advantage of caching
Browse files Browse the repository at this point in the history
  • Loading branch information
Addyvan committed Aug 26, 2020
1 parent c58f46f commit 96b1077
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,22 @@ jobs:
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Pull image
- name: Build image
run: |
version=$(cat version)
DOCKER_IMAGE=riskfuel/k8s-mig-operator:$version
docker pull $DOCKER_IMAGE
- name: Build image
run: docker-compose build shell
docker buildx build \
--cache-from "type=local,src=/tmp/.buildx-cache" \
--cache-to "type=local,dest=/tmp/.buildx-cache" \
--platform linux/amd64 \
--tag ${DOCKER_IMAGE} \
--output "type=docker" \
.
- name: Run tests
run: docker-compose run test
run: |
version=$(cat version)
DOCKER_IMAGE=riskfuel/k8s-mig-operator:$version
docker tag ${DOCKER_IMAGE} mig-operator-ci-shell
docker-compose run test

0 comments on commit 96b1077

Please sign in to comment.