Skip to content

Fix tokei install

Fix tokei install #124

Workflow file for this run

name: Docker
on:
push:
branches:
- main
pull_request: {}
env:
REGISTRY: ghcr.io
jobs:
build-and-push-images:
name: Build Docker images and Push to GitHub Container-Registry
runs-on: ubuntu-20.04
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set DIR_NAME and IMAGE_NAME (devcontainer-base)
run: |
DIR_NAME=devcontainer-base
echo "DIR_NAME=$DIR_NAME" >> $GITHUB_ENV
echo "IMAGE_NAME=gantsign/$DIR_NAME" >> $GITHUB_ENV
- name: Extract metadata (tags, labels) for Docker (devcontainer-base)
id: meta_base
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=true
labels: |
org.opencontainers.image.title=Development Container Base
org.opencontainers.image.description=Base container image for development
- name: Build and push Docker image (devcontainer-base)
uses: docker/build-push-action@v5
with:
context: ${{ env.DIR_NAME }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta_base.outputs.tags }}
cache-from: type=registry,ref=${{ fromJSON(steps.meta_base.outputs.json).tags[1] }}
cache-to: type=inline
no-cache: ${{ github.event_name != 'pull_request' }}
# Omit licenses label as there's no pratical way to get an accurate value for all the Ubuntu packages
# org.opencontainers.image.licenses=
labels: |
org.opencontainers.image.title=${{ fromJSON(steps.meta_base.outputs.json).labels['org.opencontainers.image.title'] }}
org.opencontainers.image.description=${{ fromJSON(steps.meta_base.outputs.json).labels['org.opencontainers.image.description'] }}
org.opencontainers.image.url=${{ fromJSON(steps.meta_base.outputs.json).labels['org.opencontainers.image.url'] }}
org.opencontainers.image.source=${{ fromJSON(steps.meta_base.outputs.json).labels['org.opencontainers.image.source'] }}
org.opencontainers.image.version=${{ fromJSON(steps.meta_base.outputs.json).labels['org.opencontainers.image.version'] }}
org.opencontainers.image.created=${{ fromJSON(steps.meta_base.outputs.json).labels['org.opencontainers.image.created'] }}
org.opencontainers.image.revision=${{ fromJSON(steps.meta_base.outputs.json).labels['org.opencontainers.image.revision'] }}
- name: Set DIR_NAME and IMAGE_NAME (devcontainer-dind)
run: |
DIR_NAME=devcontainer-dind
echo "DIR_NAME=$DIR_NAME" >> $GITHUB_ENV
echo "IMAGE_NAME=gantsign/$DIR_NAME" >> $GITHUB_ENV
- name: Extract metadata (tags, labels) for Docker (devcontainer-dind)
id: meta_dind
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=true
labels: |
org.opencontainers.image.title=Development Container DinD
org.opencontainers.image.description=Container image for development with Docker-in-Docker
- name: Build and push Docker image (devcontainer-dind)
uses: docker/build-push-action@v5
with:
context: ${{ env.DIR_NAME }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta_dind.outputs.tags }}
cache-from: type=registry,ref=${{ fromJSON(steps.meta_dind.outputs.json).tags[1] }}
cache-to: type=inline
no-cache: ${{ github.event_name != 'pull_request' }}
# Omit licenses label as there's no pratical way to get an accurate value for all the Ubuntu packages
# org.opencontainers.image.licenses=
labels: |
org.opencontainers.image.title=${{ fromJSON(steps.meta_dind.outputs.json).labels['org.opencontainers.image.title'] }}
org.opencontainers.image.description=${{ fromJSON(steps.meta_dind.outputs.json).labels['org.opencontainers.image.description'] }}
org.opencontainers.image.url=${{ fromJSON(steps.meta_dind.outputs.json).labels['org.opencontainers.image.url'] }}
org.opencontainers.image.source=${{ fromJSON(steps.meta_dind.outputs.json).labels['org.opencontainers.image.source'] }}
org.opencontainers.image.version=${{ fromJSON(steps.meta_dind.outputs.json).labels['org.opencontainers.image.version'] }}
org.opencontainers.image.created=${{ fromJSON(steps.meta_dind.outputs.json).labels['org.opencontainers.image.created'] }}
org.opencontainers.image.revision=${{ fromJSON(steps.meta_dind.outputs.json).labels['org.opencontainers.image.revision'] }}
- name: Set DIR_NAME and IMAGE_NAME (devcontainer-k8s)
run: |
DIR_NAME=devcontainer-k8s
echo "DIR_NAME=$DIR_NAME" >> $GITHUB_ENV
echo "IMAGE_NAME=gantsign/$DIR_NAME" >> $GITHUB_ENV
- name: Extract metadata (tags, labels) for Docker (devcontainer-k8s)
id: meta_k8s
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=true
labels: |
org.opencontainers.image.title=Development Container K8s
org.opencontainers.image.description=Container image for development with Kubernetes (K3s)
- name: Build and push Docker image (devcontainer-k8s)
uses: docker/build-push-action@v5
with:
context: ${{ env.DIR_NAME }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta_k8s.outputs.tags }}
cache-from: type=registry,ref=${{ fromJSON(steps.meta_k8s.outputs.json).tags[1] }}
cache-to: type=inline
no-cache: ${{ github.event_name != 'pull_request' }}
# Omit licenses label as there's no pratical way to get an accurate value for all the Ubuntu packages
# org.opencontainers.image.licenses=
labels: |
org.opencontainers.image.title=${{ fromJSON(steps.meta_k8s.outputs.json).labels['org.opencontainers.image.title'] }}
org.opencontainers.image.description=${{ fromJSON(steps.meta_k8s.outputs.json).labels['org.opencontainers.image.description'] }}
org.opencontainers.image.url=${{ fromJSON(steps.meta_k8s.outputs.json).labels['org.opencontainers.image.url'] }}
org.opencontainers.image.source=${{ fromJSON(steps.meta_k8s.outputs.json).labels['org.opencontainers.image.source'] }}
org.opencontainers.image.version=${{ fromJSON(steps.meta_k8s.outputs.json).labels['org.opencontainers.image.version'] }}
org.opencontainers.image.created=${{ fromJSON(steps.meta_k8s.outputs.json).labels['org.opencontainers.image.created'] }}
org.opencontainers.image.revision=${{ fromJSON(steps.meta_k8s.outputs.json).labels['org.opencontainers.image.revision'] }}
- name: Build and push Docker image (devcontainer-python3.9)
uses: devcontainers/[email protected]
with:
subFolder: devcontainer-python3.9
imageName: ghcr.io/gantsign/devcontainer-python3.9