Skip to content

Commit

Permalink
Cleanup the workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nqngo committed Nov 1, 2024
1 parent 517a34c commit 22d6033
Showing 1 changed file with 13 additions and 16 deletions.
29 changes: 13 additions & 16 deletions .github/workflows/changelog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,47 +25,44 @@ jobs:
docker run --rm alpine:latest sh -c '
apk update &&
apk add --no-cache openssh-server gnupg curl &&
apk info -w openssh-server gnupg curl' | tail -n6 > versions.txt
apk info -w openssh-server gnupg curl' | tail -n9 > versions.txt
cat versions.txt
OPENSSH_VER=$(grep -o 'openssh-server-.*' versions.txt | awk '{print $1}')
GNUPG_VER=$(grep -o 'gnupg-.*' versions.txt | awk '{print $1}')
CURL_VER=$(grep -o 'curl-.*' versions.txt | awk '{print $1}')
echo $OPENSSH_VER
echo $GNUPG_VER
echo $CURL_VER
echo "OPENSSH_VER=$OPENSSH_VER" >> "$GITHUB_ENV"
echo "GNUPG_VER=$GNUPG_VER" >> "$GITHUB_ENV"
echo "CURL_VER=$CURL_VER" >> "$GITHUB_ENV"
- name: Update CHANGELOG.md
run: |
DATE=$(date '+%Y-%m')
echo "## $DATE" >> CHANGELOG.md
echo "## $DATE" > CHANGELOG.md
echo "----------------" >> CHANGELOG.md
echo "- Alpine SHA256: $ALPINE_SHA" >> CHANGELOG.md
echo "- openssh-server version: $OPENSSH_VER" >> CHANGELOG.md
echo "- gnupg version: $GNUPG_VER" >> CHANGELOG.md
echo "- curl version: $CURL_VER" >> CHANGELOG.md
echo "docker.io/alpine@$ALPINE_SHA" >> CHANGELOG.md
echo "- $OPENSSH_VER" >> CHANGELOG.md
echo "- $GNUPG_VER" >> CHANGELOG.md
echo "- $CURL_VER" >> CHANGELOG.md
echo "" >> CHANGELOG.md
cat CHANGELOG.md
rm versions.txt
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
branch: "feature/update-alpine-$(date '+%Y-%m')"
branch: "changelog-update"
commit-message: "Generate CHANGELOG.md for $(date '+%Y-%m')"
title: "Generate CHANGELOG.md for $(date '+%Y-%m')"
body: |
Base image updated to Alpine SHA256: ${{ env.ALPINE_SHA }}
- openssh-server version: ${{ env.OPENSSH_VER }}
- gnupg version: ${{ env.GNUPG_VER }}
- curl version: ${{ env.CURL_VER }}
docker.io/alpine@${{ env.ALPINE_SHA }}
- ${{ env.OPENSSH_VER }}
- ${{ env.GNUPG_VER }}
- ${{ env.CURL_VER }}
Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request
labels: "automated update"

0 comments on commit 22d6033

Please sign in to comment.