Skip to content

Commit b2f0e4a

Browse files
committed
ci: fix linter warnings
1 parent c43ab4f commit b2f0e4a

9 files changed

+88
-32
lines changed

.github/actions/should-build-image/action.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,23 @@ inputs:
2020
runs:
2121
using: "composite"
2222
steps:
23-
- name: Checkout
23+
- if: ${{ github.event_name == 'push' }}
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 2
27+
- if: ${{ github.event_name != 'push' }}
2428
uses: actions/checkout@v4
2529
with:
2630
fetch-depth: 0
2731

2832
- id: changed-files
29-
uses: tj-actions/changed-files@v44.5.2
33+
uses: tj-actions/changed-files@v45.0.5
3034
with:
3135
base_sha: ${{ inputs.base-sha }}
3236
since_last_remote_commit: ${{ github.event_name == 'push' }}
3337
files: |
34-
./${{ inputs.build-context }}/*
35-
.github/actions/should-build-image/*
38+
${{ inputs.build-context }}/
39+
.github/actions/should-build-image/
3640
.github/workflows/__shared-ci.yml
3741
.github/workflows/__shared-get-available-images-matrix.yml
3842

.github/dependabot.template.yml

-19
This file was deleted.

.github/workflows/__shared-get-available-images-matrix.yml

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
images-matrix:
77
description: 'Available images matrix. Example: ["composer","drupal-10"]'
88
value: ${{ jobs.get-available-images-matrix.outputs.images-matrix }}
9+
permissions:
10+
contents: read
911

1012
jobs:
1113
get-available-images-matrix:

.github/workflows/generate-release-config.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
branches:
55
- main
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
get-available-images-matrix:
912
uses: ./.github/workflows/__shared-get-available-images-matrix.yml
@@ -58,7 +61,7 @@ jobs:
5861
app_id: ${{ vars.CI_BOT_APP_ID }}
5962
private_key: ${{ secrets.CI_BOT_APP_PRIVATE_KEY }}
6063

61-
- uses: hoverkraft-tech/ci-github-common/actions/create-and-merge-pull-request@0.4.3
64+
- uses: hoverkraft-tech/ci-github-common/actions/create-and-merge-pull-request@0.16.0
6265
with:
6366
github-token: ${{ steps.generate-token.outputs.token }}
6467
branch: chore/release-config

.github/workflows/main-ci.yml

+15
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ on:
44
push:
55
branches: [main]
66

7+
permissions:
8+
contents: read
9+
issues: read
10+
packages: write
11+
pull-requests: read
12+
statuses: write
13+
# FIXME: This is a workaround for having workflow actions. See https://github.com/orgs/community/discussions/38659
14+
id-token: write
15+
716
jobs:
817
ci:
918
name: Continuous Integration
@@ -15,6 +24,12 @@ jobs:
1524
uses: ./.github/workflows/__shared-get-available-images-matrix.yml
1625

1726
clean:
27+
# FIXME: This is a workaround for having workflow actions. See https://github.com/orgs/community/discussions/38659
28+
permissions:
29+
id-token: write
30+
contents: read
31+
pull-requests: read
32+
packages: write
1833
needs: get-available-images-matrix
1934
uses: hoverkraft-tech/ci-github-container/.github/workflows/[email protected]
2035
with:
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Need fix to Issue
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
inputs:
9+
#checkov:skip=CKV_GHA_7: required
10+
manual-commit-ref:
11+
description: "The SHA of the commit to get the diff for"
12+
required: true
13+
manual-base-ref:
14+
description: "By default, the commit entered above is compared to the one directly before it; to go back further, enter an earlier SHA here"
15+
required: false
16+
17+
permissions:
18+
contents: read
19+
issues: write
20+
21+
jobs:
22+
main:
23+
uses: hoverkraft-tech/ci-github-common/.github/workflows/[email protected]
24+
with:
25+
manual-commit-ref: ${{ inputs.manual-commit-ref }}
26+
manual-base-ref: ${{ inputs.manual-base-ref }}

.github/workflows/pull-request-ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
core.setOutput('comment-body','No images have been built.');
6363
}
6464
65-
- uses: hoverkraft-tech/ci-github-common/actions/create-or-update-comment@0.15.0
65+
- uses: hoverkraft-tech/ci-github-common/actions/create-or-update-comment@0.16.0
6666
with:
6767
title: "Images have been built :sparkles: !"
6868
body: |

.github/workflows/release.yml

+22-4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ name: • 🛫 Release
33
on:
44
workflow_dispatch:
55

6+
permissions:
7+
contents: write
8+
issues: read
9+
packages: write
10+
pull-requests: read
11+
# FIXME: This is a workaround for having workflow actions. See https://github.com/orgs/community/discussions/38659
12+
id-token: write
13+
614
jobs:
715
get-available-images-matrix:
816
uses: ./.github/workflows/__shared-get-available-images-matrix.yml
@@ -48,7 +56,7 @@ jobs:
4856

4957
- id: release
5058
if: steps.should-build-image.outputs.should-build-image == 'true'
51-
uses: release-drafter/release-drafter@v5
59+
uses: release-drafter/release-drafter@v6.0.0
5260
env:
5361
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5462
with:
@@ -59,36 +67,46 @@ jobs:
5967
if: steps.should-build-image.outputs.should-build-image == 'true' && steps.release.outputs.tag_name != ''
6068
run: |
6169
BUILD_TAG=$(echo "${{ steps.release.outputs.tag_name }}" | sed -E "s/^${{ matrix.image }}-//")
62-
BUILD_IMAGES='{"name":"${{ matrix.image }}","context":"images/${{ matrix.image }}", "dockerfile":"Dockerfile", "tag":"'$BUILD_TAG'", "platforms": ["linux/amd64","linux/arm64","linux/arm/v7"]}'
70+
BUILD_IMAGES='{"name":"${{ matrix.image }}","context":"images/${{ matrix.image }}", "dockerfile":"Dockerfile", "tag":"'$BUILD_TAG'", "platforms": ["linux/amd64","linux/arm64"]}'
71+
echo "BUILD_IMAGES=$BUILD_IMAGES"
6372
echo "images<<EOF" >> "$GITHUB_OUTPUT" && echo "$BUILD_IMAGES" >> "$GITHUB_OUTPUT" && echo "EOF" >> "$GITHUB_OUTPUT"
6473
6574
# FIXME: Set built images infos in file to be uploaded as artifacts, because github action does not handle job outputs for matrix
6675
# https://github.com/orgs/community/discussions/26639
6776
- if: steps.should-build-image.outputs.should-build-image == 'true'
68-
uses: hoverkraft-tech/ci-github-common/actions/set-matrix-output@0.4.3
77+
uses: hoverkraft-tech/ci-github-common/actions/set-matrix-output@0.16.0
6978
with:
7079
value: ${{ steps.set-images-to-build.outputs.images }}
7180
artifact-name: images-to-build
7281

7382
# FIXME: Download matrix ouputs from artifacts, because github action does not handle job outputs for matrix
7483
# https://github.com/orgs/community/discussions/26639
84+
# jscpd:ignore-start
7585
get-images-to-build:
7686
needs: prepare-images-to-build
7787
runs-on: "ubuntu-latest"
7888
outputs:
7989
images: ${{ steps.get-matrix-outputs.outputs.result }}
8090
steps:
8191
- id: get-matrix-outputs
82-
uses: hoverkraft-tech/ci-github-common/actions/get-matrix-outputs@0.4.3
92+
uses: hoverkraft-tech/ci-github-common/actions/get-matrix-outputs@0.16.0
8393
with:
8494
artifact-name: "images-to-build"
8595

8696
build-images:
8797
needs: get-images-to-build
8898
if: needs.get-images-to-build.outputs.images != '[]'
99+
# FIXME: This is a workaround for having workflow actions. See https://github.com/orgs/community/discussions/38659
100+
permissions:
101+
id-token: write
102+
contents: read
103+
packages: write
104+
issues: read
105+
pull-requests: read
89106
uses: hoverkraft-tech/ci-github-container/.github/workflows/[email protected]
90107
with:
91108
oci-registry: ${{ vars.OCI_REGISTRY }}
92109
images: ${{ needs.get-images-to-build.outputs.images }}
93110
secrets:
94111
oci-registry-password: ${{ secrets.GITHUB_TOKEN }}
112+
# jscpd:ignore-end

README.md

+10-3
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,25 @@
22

33
Opinionated Docker base images
44

5-
## Builded Images
5+
## Our images
66

77
### [ci-helm](images/ci-helm/README.md)
88

9+
A docker image with all the tools needed to validate an helm chart
10+
11+
- helm chart-testing (aka ct)
12+
- helm kubeconform plugin
13+
914
### [mydumper](images/mydumper/README.md)
1015

11-
### Prerequisites
16+
An image with an opiniated mydumper command as entrypoint
17+
18+
## Prerequisites
1219

1320
- [Docker](https://docs.docker.com/get-docker/)
1421
- Make
1522

16-
### Linting
23+
## Linting
1724

1825
- Lint all files: `make lint`
1926
- Lint a specific file: `make lint images/ci-helm/Dockerfile`

0 commit comments

Comments
 (0)