Skip to content

Commit a38f971

Browse files
authored
Merge pull request #206 from axivo/fix/renovate-configuration
fix: improve workflow
2 parents 00a3cd3 + ce1a1a2 commit a38f971

File tree

2 files changed

+27
-19
lines changed

2 files changed

+27
-19
lines changed

.github/workflows/checksums.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Update Go Checksums
1+
name: Update Module Checksums
22

33
on:
44
pull_request:
@@ -19,10 +19,10 @@ permissions:
1919

2020
jobs:
2121
update:
22-
name: Update Checksums
22+
name: Update Module Checksums
2323
runs-on: ubuntu-latest
2424
steps:
25-
- name: Checkout code
25+
- name: Checkout repository
2626
uses: actions/checkout@v4
2727

2828
- name: Setup Hugo
@@ -31,7 +31,7 @@ jobs:
3131
extended: true
3232
hugo-version: 0.145.0
3333

34-
- name: Update checksums
34+
- name: Update module checksums
3535
uses: actions/github-script@v7
3636
with:
3737
github-token: ${{ secrets.GITHUB_TOKEN }}
@@ -52,16 +52,24 @@ jobs:
5252
));
5353
const files = (await runGit(['diff', '--name-only'])).split('\n').filter(Boolean);
5454
if (files.length === 0) {
55-
core.info('No changes detected');
55+
core.info('No file changes detected');
5656
return;
5757
}
58-
const additions = await Promise.all(files.map(async file => {
59-
const contents = await fs.readFile(file, 'utf-8');
60-
return {
61-
path: file,
62-
contents: Buffer.from(contents).toString('base64')
63-
};
64-
}));
58+
const additions = await Promise.all((await runGit(['diff', '--name-only', '--diff-filter=AM']))
59+
.split('\n')
60+
.filter(Boolean)
61+
.map(async file => {
62+
const contents = await fs.readFile(file, 'utf-8');
63+
return {
64+
path: file,
65+
contents: Buffer.from(contents).toString('base64')
66+
};
67+
})
68+
);
69+
const deletions = (await runGit(['diff', '--name-only', '--diff-filter=D']))
70+
.split('\n')
71+
.filter(Boolean)
72+
.map(file => ({ path: file }));
6573
const input = {
6674
branch: {
6775
repositoryNameWithOwner: context.payload.repository.full_name,
@@ -70,7 +78,7 @@ jobs:
7078
expectedHeadOid: context.payload.pull_request.head.sha,
7179
fileChanges: {
7280
additions: additions,
73-
deletions: []
81+
deletions: deletions
7482
},
7583
message: { headline: 'chore(github-action): update module checksums' }
7684
};

.github/workflows/documentation.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
name: Build Documentation
2929
runs-on: ubuntu-latest
3030
steps:
31-
- name: Checkout Repo
31+
- name: Checkout repository
3232
uses: actions/checkout@v4
3333

3434
- name: Setup Hugo
@@ -37,31 +37,31 @@ jobs:
3737
extended: true
3838
hugo-version: 0.145.0
3939

40-
- name: Build Content
40+
- name: Build content
4141
env:
4242
HUGO_ENV: production
4343
TZ: America/New_York
4444
run: |
4545
hugo --gc --minify -s ./docs
4646
hugo --gc --minify -s ./k3s-cluster
4747
48-
- name: Configure Pages
48+
- name: Configure pages
4949
id: pages
5050
uses: actions/configure-pages@v5
5151

52-
- name: Upload Pages Artifact
52+
- name: Upload pages artifact
5353
uses: actions/upload-pages-artifact@v3
5454
with:
5555
path: ./public
5656

5757
deploy:
58-
name: Deploy Documentation to GitHub Pages
58+
name: Deploy Documentation
5959
environment:
6060
name: github-pages
6161
url: ${{ steps.deployment.outputs.page_url }}
6262
needs: build
6363
runs-on: ubuntu-latest
6464
steps:
65-
- name: Deploy Documentation
65+
- name: Deploy documentation
6666
id: deployment
6767
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)