Fix actions to use build cache
This commit is contained in:
parent
b8d2ef1eb5
commit
b4ea11e55e
11
.github/workflows/docker-compile-master.yml
vendored
11
.github/workflows/docker-compile-master.yml
vendored
@ -13,6 +13,17 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
-
|
||||
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-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
- name: Build and push Docker images
|
||||
uses: docker/build-push-action@v1
|
||||
with:
|
||||
|
||||
11
.github/workflows/docker-compile-tag.yml
vendored
11
.github/workflows/docker-compile-tag.yml
vendored
@ -14,6 +14,17 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
-
|
||||
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-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
- name: Build and push Docker images
|
||||
uses: docker/build-push-action@v1
|
||||
with:
|
||||
|
||||
29
.github/workflows/docker-compile.yml
vendored
29
.github/workflows/docker-compile.yml
vendored
@ -8,18 +8,29 @@ on:
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
SQLX_OFFLINE: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build and push Docker images
|
||||
uses: docker/build-push-action@v1
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
-
|
||||
name: Cache Docker layers
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
registry: docker.pkg.github.com
|
||||
repository: modrinth/labrinth/labrinth
|
||||
tag_with_ref: true
|
||||
tag_with_sha: true
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-buildx-
|
||||
- name: Build Docker images
|
||||
uses: docker/build-push-action@v1
|
||||
with:
|
||||
push: false
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
registry: docker.pkg.github.com
|
||||
repository: modrinth/labrinth/labrinth
|
||||
tag_with_ref: true
|
||||
tag_with_sha: true
|
||||
Loading…
x
Reference in New Issue
Block a user