From e77855a40edd6900d47381802081b2f2747090a7 Mon Sep 17 00:00:00 2001 From: Sitri Kamishirasawa Date: Mon, 4 Nov 2024 17:19:17 +0900 Subject: [PATCH 1/5] feat: WIP --- .github/workflows/lint.yaml | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 9117e0b..fb0a882 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -7,7 +7,7 @@ on: pull_request: jobs: - lint: + bun-lint: runs-on: ubuntu-latest steps: # setup @@ -22,3 +22,26 @@ jobs: - run: bun lint:docs:ja # bun lint may be biome, so you may not need to run. - run: biome ci . + hadolint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - uses: hadolint/hadolint-action@v3.1.0 + with: + dockerfile: Dockerfile + dockle: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Build an image from Dockerfile + run: | + docker build -t built-image:scan . + - name: Run dockle + uses: goodwithtech/dockle-action@main + with: + image: 'built-image:scan' +# format: 'list' +# exit-code: '1' +# exit-level: 'warn' From b76520f4d4a9b36765c10fd586f9341a9dee9821 Mon Sep 17 00:00:00 2001 From: Sitri Kamishirasawa Date: Mon, 4 Nov 2024 18:10:41 +0900 Subject: [PATCH 2/5] feat: WIP --- .github/workflows/lint.yaml | 7 ++----- Dockerfile | 1 + 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index fb0a882..6a96821 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -37,11 +37,8 @@ jobs: uses: actions/checkout@v2 - name: Build an image from Dockerfile run: | - docker build -t built-image:scan . + docker build -t built-image . - name: Run dockle uses: goodwithtech/dockle-action@main with: - image: 'built-image:scan' -# format: 'list' -# exit-code: '1' -# exit-level: 'warn' + image: 'built-image' diff --git a/Dockerfile b/Dockerfile index aea2825..82fd003 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ FROM oven/bun:alpine@sha256:490d28250f51bf30fd88c3277f43c2c2bd721599d9ae373458c487d27bcb10f3 +WORKDIR /home/bun/app COPY tsconfig.json ./ COPY src/ ./src/ COPY scripts/ ./scripts/ From ef7050478aab4e729073629f7ec6ffd680ebe042 Mon Sep 17 00:00:00 2001 From: Sitri Kamishirasawa Date: Mon, 4 Nov 2024 20:53:23 +0900 Subject: [PATCH 3/5] fix: actions/checkout version --- .github/workflows/lint.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 6a96821..1e12542 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - uses: hadolint/hadolint-action@v3.1.0 with: dockerfile: Dockerfile @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - name: Build an image from Dockerfile run: | docker build -t built-image . From dab78873a291ff08b215c32692a1f85ac5f40add Mon Sep 17 00:00:00 2001 From: Sitri Kamishirasawa Date: Mon, 4 Nov 2024 20:53:30 +0900 Subject: [PATCH 4/5] feat: dockerlint --- .github/workflows/lint.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 1e12542..72046e5 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -22,6 +22,16 @@ jobs: - run: bun lint:docs:ja # bun lint may be biome, so you may not need to run. - run: biome ci . + dockerlint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - name: Setup Bun + uses: oven-sh/setup-bun@4bc047ad259df6fc24a6c9b0f9a0cb08cf17fbe5 # v2 + - name: Setup Biome + uses: biomejs/setup-biome@1cbe33ead22c7a2fded3b52fa2893611c815c9b5 # v2 + - run: bunx dockerlint Dockerfile hadolint: runs-on: ubuntu-latest steps: From 2dd1d8a8fb16e17d698d2eb50fc155a6cff82b68 Mon Sep 17 00:00:00 2001 From: Sitri Kamishirasawa Date: Mon, 4 Nov 2024 22:11:25 +0900 Subject: [PATCH 5/5] feat: remove dockle --- .github/workflows/lint.yaml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 72046e5..80deff3 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -40,15 +40,3 @@ jobs: - uses: hadolint/hadolint-action@v3.1.0 with: dockerfile: Dockerfile - dockle: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 - - name: Build an image from Dockerfile - run: | - docker build -t built-image . - - name: Run dockle - uses: goodwithtech/dockle-action@main - with: - image: 'built-image'