Skip to content

Commit

Permalink
testing gha workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
ikatson committed Aug 27, 2024
1 parent 55a6d71 commit 775cca8
Showing 1 changed file with 40 additions and 16 deletions.
56 changes: 40 additions & 16 deletions .github/workflows/test-gha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,45 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
id: builder1
# - uses: crazy-max/ghaction-github-runtime@v3
# - run: cd openssl-cross-docker-build &&
# mkdir -p output/ &&
# docker build --progress=plain
# --builder ${{ steps.builder1.outputs.name }}
# --cache-from=type=gha,scope=$platform
# --cache-to=type=gha,scope=$platform,mode=max
# --platform linux/arm/v7
# --output=type=local,dest=output/
# -t testf .

- name: Build and push Docker image
uses: docker/build-push-action@v5
- name: Cache
uses: actions/cache@v3
id: cache
with:
context: openssl-cross-docker-build
file: openssl-cross-docker-build/Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=max
path: |
usr-local-cargo-git-db
usr-local-cargo-registry-cache
usr-local-cargo-registry-index
src-target
key: cache-${{ hashFiles('openssl-cross-docker-build/Dockerfile') }}

- name: inject cache into docker
uses: reproducible-containers/[email protected]
with:
cache-map: |
{
"usr-local-cargo-git-db": "/usr/local/cargo/git/db",
"usr-local-cargo-registry-cache": "/usr/local/cargo/registry/cache",
"usr-local-cargo-registry-index": "/usr/local/cargo/registry/index",
"src-target": "/src/target"
}
skip-extraction: ${{ steps.cache.outputs.cache-hit }}

- uses: crazy-max/ghaction-github-runtime@v3
- run: cd openssl-cross-docker-build &&
mkdir -p output/ &&
docker build --progress=plain
--builder ${{ steps.builder1.outputs.name }}
--cache-from=type=gha,scope=$platform
--cache-to=type=gha,scope=$platform,mode=max
--platform linux/arm/v7
--output=type=local,dest=output/
-t testf .

# - name: Build and push Docker image
# uses: docker/build-push-action@v5
# with:
# context: openssl-cross-docker-build
# file: openssl-cross-docker-build/Dockerfile
# cache-from: type=gha
# cache-to: type=gha,mode=max

0 comments on commit 775cca8

Please sign in to comment.