Skip to content

latest-weekly

latest-weekly #115047

name: latest-weekly
on:
schedule:
- cron: "*/15 * * * *"
workflow_dispatch:
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Check out source code
uses: actions/checkout@v4
- name: Jenkins Weekly version
id: update
uses: jenkins-infra/[email protected]
with:
version-identifier: latest
- 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: |
if [[ $(git diff --stat) != '' ]]; then
echo "changed=true" >> $GITHUB_OUTPUT
else
echo "changed=false" >> $GITHUB_OUTPUT
fi
- uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
id: generate-token
if: ${{ steps.diff.outputs.changed == 'true' }}
with:
app_id: ${{ secrets.JENKINS_ADMIN_APP_ID }}
private_key: ${{ secrets.JENKINS_ADMIN_APP_PRIVKEY }}
- name: Create Pull Request
id: cpr
if: ${{ steps.diff.outputs.changed == 'true' }}
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
with:
commit-message: 'feat(deps): bump jenkins weekly to ${{ steps.update.outputs.jenkins_version }}'
signoff: false
title: 'feat(deps): bump jenkins weekly to ${{ steps.update.outputs.jenkins_version }}'
branch: latest-weekly
token: ${{ steps.generate-token.outputs.token }}