Skip to content

Commit

Permalink
rename and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
gionn committed Sep 4, 2023
1 parent 2cea3e0 commit 588a7fe
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-tools-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
tags:
- 'v*'
paths:
- 'scripts/gen-charts-yml/**'
- 'scripts/gen-index-yml/**'

env:
REGISTRY: ghcr.io
Expand All @@ -27,7 +27,7 @@ jobs:
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/alfresco/build-tools-gen-charts-yml
images: ${{ env.REGISTRY }}/alfresco/build-tools-gen-index-yml
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
Expand All @@ -49,7 +49,7 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v4
with:
context: ./scripts/gen-charts-yml
context: ./scripts/gen-index-yml
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ WORKDIR /root
ADD requirements.txt .
RUN pip install -r requirements.txt

ADD gen_charts_yml.py /usr/bin/
ADD gen_index_yml.py /usr/bin/

ENTRYPOINT ["python", "/usr/bin/gen_charts_yml.py"]
ENTRYPOINT ["python", "/usr/bin/gen_index_yml.py"]
18 changes: 18 additions & 0 deletions scripts/gen-index-yml/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generate a yaml index from subfolders in a folder

This is a quick script which can enumerate subfolders inside a given folder and
generate/update a yaml which contains a dictionary where each entry is a subfolder name.

Can be used in GitHub Actions matrix workflows to generate the list to iterate.

Can be hooked in pre-commit as a local hook with:

```yaml
- repo: local
hooks:
- id: update-index-yml
name: update charts.yml file
language: docker_image
entry: ghcr.io/alfresco/build-tools-gen-index-yml:master
pass_filenames: false
```
File renamed without changes.
File renamed without changes.

0 comments on commit 588a7fe

Please sign in to comment.