latest-lts #118228
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: latest-lts | |
on: | |
schedule: | |
- cron: "*/15 * * * *" | |
workflow_dispatch: | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v4 | |
- name: Jenkins LTS version | |
id: update | |
uses: jenkins-infra/[email protected] | |
with: | |
version-identifier: lts | |
- name: Process Version | |
id: process | |
run: | | |
SUFFIX=jdk17 | |
FULL_VERSION=jenkins/jenkins:${{ steps.update.outputs.jenkins_version }}-${SUFFIX} | |
echo $FULL_VERSION | |
sed -i 's|FROM .*|FROM '"${FULL_VERSION}"'|' Dockerfile | |
- name: Calculate Diff | |
id: diff | |
run: | | |
git diff | |
if [[ $(git diff --stat) != '' ]]; then | |
echo "changed=true" >> $GITHUB_OUTPUT | |
else | |
echo "changed=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Update | |
if: ${{ steps.diff.outputs.changed == 'true' }} | |
uses: jenkins-infra/[email protected] | |
- uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0 | |
id: generate-token | |
with: | |
app_id: ${{ secrets.JENKINS_ADMIN_APP_ID }} | |
private_key: ${{ secrets.JENKINS_ADMIN_APP_PRIVKEY }} | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5 | |
with: | |
commit-message: 'feat(deps): bump jenkins lts to ${{ steps.update.outputs.jenkins_version }}' | |
signoff: false | |
title: 'feat(deps): bump jenkins lts to ${{ steps.update.outputs.jenkins_version }}' | |
branch: latest-lts | |
token: ${{ steps.generate-token.outputs.token }} |