Skip to content

Commit

Permalink
add ci for demo image
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasCARPi committed Aug 7, 2024
1 parent b30c75b commit 1c466db
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/build_push_demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Build and publish demo image

on:
push:

## GITHUB_TOKEN authentication
permissions:
contents: write

jobs:
buildandpush:
runs-on: ubuntu-latest
steps:
# https://github.com/CycodeLabs/cimon-action
- name: Cimon supply chain attack protection
uses: cycodelabs/cimon-action@v0
with:
prevent: true
allowed-hosts: >
codeload.github.com
dl-cdn.alpinelinux.org
docker.io
ghcr.io
index.docker.io
nginx.org
packagist.org
pkg-containers.githubusercontent.com
production.cloudflare.docker.com
registry.yarnpkg.com
repo.yarnpkg.com
registry.npmjs.org
- name: Checkout elabimg repo
uses: actions/checkout@v4

# https://github.com/marketplace/actions/docker-setup-buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

# https://github.com/docker/setup-qemu-action#usage
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

# https://github.com/docker/login-action#docker-hub
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

# https://github.com/docker/build-push-action#multi-platform-image
# https://docs.docker.com/build/ci/github-actions/cache/
- name: Build latest release for x86 and push to Docker Hub
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
ELABFTW_VERSION=demo
tags: |
elabftw/elabimg:demo

0 comments on commit 1c466db

Please sign in to comment.