Skip to content

Try to fix the image build #231

Try to fix the image build

Try to fix the image build #231

Workflow file for this run

on:
pull_request: {}
push: {}
name: Continuous integration
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.16'
- name: go build
run: |
go build ./...
- name: go install
run: |
GOBIN=$(pwd)/install go install ./...
- name: go test
run: |
PATH=$PATH:$(pwd)/install go test -tags llama.runtime ./...
- name: Check license headers
run: |
./scripts/dev/check-license
build-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build docker image
run: |
docker build -t "ghcr.io/nelhage/llama:$GITHUB_SHA" .
- name: Push docker image
run: |
docker push "ghcr.io/nelhage/llama:$GITHUB_SHA"
- name: Tag "latest" docker container
if: ${{github.event_name == 'push' && github.ref == 'refs/heads/main'}}
run: |
docker tag "ghcr.io/nelhage/llama:$GITHUB_SHA" "ghcr.io/nelhage/llama:latest"
docker push "ghcr.io/nelhage/llama:latest"