Updated README to use new model and mspinpoint/mindglide on dockerhub. #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image CI | |
# on: | |
#push: | |
# branches: [ "master" ] | |
#pull_request: | |
# branches: [ "master" ] | |
#workflow_dispatch: | |
on: null # Disables all triggers for this workflow | |
jobs: | |
push_to_registry: | |
name: Build and Push Docker image to Docker Hub | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
with: | |
lfs: true # Ensure Git LFS objects are checked out | |
- name: Set up Docker BuildKit | |
run: | | |
echo "DOCKER_BUILDKIT=1" >> $GITHUB_ENV | |
echo "COMPOSE_DOCKER_CLI_BUILD=1" >> $GITHUB_ENV | |
- name: Log in to Docker Hub | |
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a | |
with: | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 | |
with: | |
images: mspinpoint/mindglide | |
tags: | | |
type=ref,event=branch | |
type=semver,pattern={{version}} | |
type=sha | |
- 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 image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build-args: | | |
USER_ID=32814 | |
GROUP_ID=221 | |
UNAME=user | |
USERNAME=user | |
cache-from: type=local,src=/tmp/.buildx-cache | |
cache-to: type=local,dest=/tmp/.buildx-cache-new | |
- name: Move Docker cache | |
run: | | |
rm -rf /tmp/.buildx-cache | |
mv /tmp/.buildx-cache-new /tmp/.buildx-cache | |
- name: Check disk space after build | |
run: df -h |