Skip to content

use unprivileged image #9

use unprivileged image

use unprivileged image #9

Workflow file for this run

name: Build and Push Wiki Cedille Docker Image
on:
push:
branches:
- master
paths:
- 'wiki/**'
env:
REGISTRY: ghcr.io/clubcedille
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Check Out Repo
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./wiki/Dockerfile
push: true
tags: |
${{ env.REGISTRY }}/wiki-cedille:commit-${{ github.sha }}
${{ env.REGISTRY }}/wiki-cedille:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,mode=max,dest=/tmp/.buildx-cache-new
- name: Refresh Cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache