From 732cdc3bd09fde35756022a4586a0017f3a2eb9d Mon Sep 17 00:00:00 2001 From: Nico Braun Date: Tue, 16 Jan 2024 23:10:32 +0100 Subject: [PATCH] ci: image build on demand Signed-off-by: Nico Braun --- .github/workflows/image.yaml | 24 ++++++++++++++++++++++++ .yamlfmt | 7 ++++++- build/compose.yaml | 6 +++--- 3 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/image.yaml diff --git a/.github/workflows/image.yaml b/.github/workflows/image.yaml new file mode 100644 index 0000000..26729cc --- /dev/null +++ b/.github/workflows/image.yaml @@ -0,0 +1,24 @@ +name: image + +on: + workflow_dispatch: {} + push: + branches: + - refactor/rewrite + +jobs: + image: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Login to the container registry + run: docker login --username bluebrown --password ${{secrets.DOCKERHUB_TOKEN}} + + - name: build image + run: make image + env: + DOCKER_BUILDKIT: "1" + + - name: publish image + run: docker push docker.io/bluebrown/kobold --all-tags diff --git a/.yamlfmt b/.yamlfmt index 39827f7..5a6f1de 100644 --- a/.yamlfmt +++ b/.yamlfmt @@ -1,6 +1,11 @@ -continue_on_error: true +doublestar: true +include: +- "**/*.yaml" +exclude: +- "**/testdata/**" formatter: type: basic indent: 2 scan_folded_as_literal: true retain_line_breaks: true + indentless_arrays: true diff --git a/build/compose.yaml b/build/compose.yaml index efce38b..a0423a2 100644 --- a/build/compose.yaml +++ b/build/compose.yaml @@ -5,10 +5,10 @@ services: context: ../ dockerfile: build/Dockerfile ports: - - 127.0.0.1:8081:8080 + - 127.0.0.1:8081:8080 volumes: - - ../testdata/kobold.toml:/etc/kobold/kobold.toml:ro - - ../.local/.ssh:/etc/kobold/.ssh:rw + - ../testdata/kobold.toml:/etc/kobold/kobold.toml:ro + - ../.local/.ssh:/etc/kobold/.ssh:rw environment: GITHUB_TOKEN: null ADO_HOST: null