Skip to content

Commit

Permalink
feat(github): better workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
buroa committed Dec 31, 2024
1 parent a5d8da8 commit 8d33b44
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/flux-diff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ jobs:
args: >-
diff ${{ matrix.resources }}
--unified 6
--path ${{ github.workspace }}/pull/kubernetes/flux
--path-orig ${{ github.workspace }}/default/kubernetes/flux
--path /github/workspace/pull/kubernetes/flux
--path-orig /github/workspace/default/kubernetes/flux
--strip-attrs "helm.sh/chart,checksum/config,app.kubernetes.io/version,chart"
--limit-bytes 10000
--all-namespaces
Expand All @@ -59,14 +59,18 @@ jobs:
- name: Generate Diff
id: diff
run: |
diff=$(cat diff.patch)
echo "diff<<EOF" >> $GITHUB_OUTPUT
echo "$diff" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
echo "### Diff" >> GITHUB_STEP_SUMMARY
echo '```diff' >> GITHUB_STEP_SUMMARY
echo "$diff" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
cat diff.patch;
{
echo 'diff<<EOF'
cat diff.patch
echo EOF
} >> "$GITHUB_OUTPUT";
{
echo "### Diff"
echo '```diff'
cat diff.patch
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
- if: ${{ steps.diff.outputs.diff != '' }}
name: Add Comment
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-pull-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
with:
args: >-
get cluster
--path ${{ github.workspace }}/kubernetes/flux
--path /github/workspace/kubernetes/flux
--enable-images
--output yaml
--output-file images.yaml
Expand Down

0 comments on commit 8d33b44

Please sign in to comment.