Skip to content

ignore a couple more files that we want to fix with code #5

ignore a couple more files that we want to fix with code

ignore a couple more files that we want to fix with code #5

name: Build Base Image
on:
workflow_dispatch:
push:
# branches: #temporary to test
# - "main"
# paths:
# - ".docker/base/**"
concurrency:
group: base-${{ github.ref }}
cancel-in-progress: true
jobs:
# Uses buildx to build and push the image
build-and-upload-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
# Key is named differently to avoid collision
key: ${{ runner.os }}-multi-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-multi-buildx
- name: Login to GHCR
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Image
uses: docker/build-push-action@v3
with:
context: .
builder: ${{ steps.buildx.outputs.name }}
file: .docker/base/Dockerfile.base
push: "true"
tags: ghcr.io/health-connector/gluedb:base
cache-from: type=local,src=/tmp/.buildx-cache
# Note the mode=max here
# More: https://github.com/moby/buildkit#--export-cache-options
# And: https://github.com/docker/buildx#--cache-tonametypetypekeyvalue
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache