Skip to content

Commit 0d7c125

Browse files
committed
ci: automated readme updates
1 parent 6716d7c commit 0d7c125

File tree

3 files changed

+83
-0
lines changed

3 files changed

+83
-0
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ on:
44
push:
55
branches:
66
- main
7+
paths:
8+
- src/**/*
79
workflow_dispatch:
810

911
env:

.github/workflows/update-tags.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Update Supported Tags list
2+
3+
on:
4+
registry_package:
5+
types:
6+
- published
7+
push:
8+
branches:
9+
- main
10+
paths:
11+
- README.md.tpl
12+
workflow_dispatch:
13+
14+
env:
15+
REGISTRY: ghcr.io
16+
17+
jobs:
18+
update-readme:
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: write
22+
packages: read
23+
outputs:
24+
tags: tags
25+
steps:
26+
- name: Install skopeo
27+
run: |
28+
sudo apt-get update
29+
sudo apt-get install -y skopeo
30+
31+
- name: Login to ${{ env.REGISTRY }}
32+
run: |
33+
skopeo login -u ${{ github.actor }} -p ${{ github.token }} ghcr.io
34+
35+
- uses: actions/checkout@v4
36+
with:
37+
token: "${{ github.token }}"
38+
39+
- name: Fetch tags
40+
run: |
41+
skopeo list-tags --override-os linux \
42+
docker://${{ env.REGISTRY }}/${{ github.repository }} \|
43+
jq '.Tags | map(select(test("^[\\d.]+"))) | sort | reverse' |\
44+
gomplate -f README.md.tpl -o README.md -d "data=stdin:?type=application/array%2Bjson"
45+
46+
- name: Commit changes
47+
run: |
48+
git config user.name "github-actions[bot]"
49+
git config user.email "github-actions[bot]@users.noreply.github.com"
50+
git add README.md
51+
git commit --no-interactive -m "docs: update README.md"
52+
git push

README.md.tpl

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# php-devcontainer
2+
3+
> A custom devcontainer image suited for Php development.
4+
5+
## Supported tags
6+
{{ range (ds "data") }}
7+
- {{ . }}
8+
{{- end }}
9+
10+
## Contents
11+
12+
### Tools
13+
14+
- zsh
15+
- [atuin](https://atuin.sh/)
16+
- [starship](https://starship.rs/)
17+
- composer
18+
- nano
19+
20+
### Php Extensions
21+
22+
- xdebug
23+
- pgsql
24+
- pdo_pgsql
25+
- redis
26+
- opcache
27+
- pcntl
28+
- zip
29+
- intl

0 commit comments

Comments
 (0)