Skip to content

Commit

Permalink
fix: Add Docker image toolkit
Browse files Browse the repository at this point in the history
  • Loading branch information
mtweeman committed Sep 11, 2024
1 parent ab1cf21 commit 99a4bde
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 28 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

on:
push:
tags:
- v*.*.*
pull_request:
workflow_dispatch:


jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
mtweeman/hajle-silesia_provisioning-ld
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=pr
type=sha
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v6
with:
platforms: linux/amd64, linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
6 changes: 3 additions & 3 deletions .github/workflows/static-analysis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ jobs:
terraform-version: ${{ needs.preparation.outputs.terraform-version }}
severity: ${{ needs.preparation.outputs.severity }}

static-analysis-pre-commit-test:
static-analysis-geodesic-test:
needs:
- preparation
name: Static analysis pre-commit
uses: ./.github/workflows/static-analyzers-aggregator-pre-commit.yaml
name: Static analysis geodesic test
uses: ./.github/workflows/static-analyzers-aggregator-geodesic-test.yaml
24 changes: 24 additions & 0 deletions .github/workflows/static-analyzers-aggregator-geodesic-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Static analyzers aggregator geodesic test

on:
workflow_call:

permissions:
contents: read

jobs:
static-analysis-geodesic-test:
name: Static analysis geodesic test
runs-on: ubuntu-latest
container:
image: mtweeman/hajle-silesia_provisioning-ld:0.2.0

steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure git
run: |
git config --global --add safe.directory $GITHUB_WORKSPACE
- name: Run static analysis
run: |
pre-commit run --all-files --hook-stage manual
23 changes: 0 additions & 23 deletions .github/workflows/static-analyzers-aggregator-pre-commit.yaml

This file was deleted.

11 changes: 9 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,16 @@ ENV DOCKER_TAG="latest"
# source: https://mise.jdx.dev/getting-started.html
ARG MISE_VERSION
ARG MISE_INSTALL_PATH="/usr/local/bin/mise"
RUN curl https://mise.run | MISE_INSTALL_PATH="${MISE_INSTALL_PATH}" MISE_VERSION="${MISE_VERSION}" sh
RUN echo "eval \"\$(${MISE_INSTALL_PATH} activate bash)\"" >> ~/.profile
ARG MISE_DATA_DIR="/usr/share/xdg_data_home/mise"
RUN curl https://mise.run | \
MISE_VERSION="${MISE_VERSION}" \
MISE_INSTALL_PATH="${MISE_INSTALL_PATH}" \
MISE_DATA_DIR="${MISE_DATA_DIR}" \
sh
ENV PATH="${MISE_DATA_DIR}/shims:$PATH"
# defaults for all users
# source: https://mise.jdx.dev/configuration.html#system-config-etc-mise-config-toml
COPY .mise.toml /etc/mise/config.toml
# install tools
# source: https://mise.jdx.dev/cli/install.html
RUN mise install --yes

0 comments on commit 99a4bde

Please sign in to comment.