Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
maxime1907 committed Jul 19, 2023
0 parents commit 3feb924
Show file tree
Hide file tree
Showing 7 changed files with 864 additions and 0 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# GitHub recommends pinning actions to a commit SHA.
# To get a newer version, you will need to update the SHA.
# You can also reference a tag or branch, but the action may change without warning.

name: Create and publish a Docker image

on:
push:
tags:
- '*'
branches:
- 'main'
- 'master'
pull_request:
branches:
- master
- main

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
IMAGE_VERSION: 0.3.0

jobs:
build-and-push-image:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
context:
- name: python/3.10-slim
target: root
suffix: ""
- name: python/3.10-slim
target: rootless
suffix: -rootless

permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/[email protected]
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=auto
prefix=
suffix=${{ matrix.context.suffix }}
- name: Build Docker image
uses: docker/[email protected]
with:
context: ${{ matrix.context.name }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: SOURCEKNIGHT_VERSION=${{ env.IMAGE_VERSION }}
target: ${{ matrix.context.target }}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# If you want to ignore files created by your editor/tools, please consider a
# [global .gitignore](https://help.github.com/articles/ignoring-files).

*~
*.bak
*.orig
.*.swp
.DS_Store
thumbs.db
Loading

0 comments on commit 3feb924

Please sign in to comment.