fix github action docker
This commit is contained in:
parent
c6b2c6fd8f
commit
4941df7f3b
1 changed files with 14 additions and 15 deletions
29
.github/workflows/docker.yml
vendored
29
.github/workflows/docker.yml
vendored
|
@ -24,18 +24,8 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
config:
|
||||||
- { tag: "latest", dockerfile: ".devops/main.Dockerfile" }
|
- { tag: "light", dockerfile: ".devops/main.Dockerfile" }
|
||||||
- { tag: "full", dockerfile: ".devops/full.Dockerfile" }
|
- { tag: "full", dockerfile: ".devops/full.Dockerfile" }
|
||||||
- {
|
|
||||||
tag: "light",
|
|
||||||
dockerfile: ".devops/main.Dockerfile",
|
|
||||||
include_hash: true,
|
|
||||||
}
|
|
||||||
- {
|
|
||||||
tag: "full",
|
|
||||||
dockerfile: ".devops/full.Dockerfile",
|
|
||||||
include_hash: true,
|
|
||||||
}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check out the repo
|
- name: Check out the repo
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -49,14 +39,23 @@ jobs:
|
||||||
- name: Log in to Docker Hub
|
- name: Log in to Docker Hub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
registry: docker.pkg.github.com
|
registry: ghcr.io
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push Docker image (versioned)
|
||||||
|
if: github.event_name == 'push'
|
||||||
|
uses: docker/build-push-action@v4
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: "ghcr.io/ggerganov/llama.cpp:${{ matrix.config.tag }}-${{ env.COMMIT_SHA }}"
|
||||||
|
file: ${{ matrix.config.dockerfile }}
|
||||||
|
|
||||||
- name: Build and push Docker image (tagged)
|
- name: Build and push Docker image (tagged)
|
||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: github.event_name == 'push'
|
||||||
tags: "ghcr.io/ggerganov/llama.cpp:{{ matrix.config.tag }}{{ matrix.config.include_hash && '-{{ env.COMMIT_SHA }}' || '' }}"
|
tags: "ghcr.io/ggerganov/llama.cpp:${{ matrix.config.tag }}"
|
||||||
file: ${{ matrix.config.dockerfile }}
|
file: ${{ matrix.config.dockerfile }}
|
Loading…
Add table
Add a link
Reference in a new issue