Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test Commit #3

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/summarize-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Process PR

on:
pull_request_target:

jobs:
prepare_pr_information:
name : Generate Diff
runs-on : ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Generate Diff
id : generate_diff
run : |
bash ./bin/update-dockerfiles.sh
echo "GIT_DIFF<<EOF" >> $GITHUB_ENV
git diff >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Add Comment
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
diff= '```' + `${{ env.GIT_DIFF }}` + '```'
console.log( diff )
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: diff
})
2 changes: 1 addition & 1 deletion .github/workflows/verify-images.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Verify Docker Images

on: [push, pull_request]
on:

jobs:
verify-corretto:
Expand Down
42 changes: 21 additions & 21 deletions bin/update-dockerfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ update_musl_linux() {
CORRETTO_VERSION=$1
MAJOR_RELEASE=$2

sed -i "" "s/ARG version=.*/ARG version=${CORRETTO_VERSION}/g" ./${MAJOR_RELEASE}/jdk/alpine/Dockerfile
sed -i "s/ARG version=.*/ARG version=${CORRETTO_VERSION}/g" ./${MAJOR_RELEASE}/jdk/alpine/Dockerfile
if [ -f ./${MAJOR_RELEASE}/jre/alpine/Dockerfile ]; then
sed -i "" "s/ARG version=.*/ARG version=${CORRETTO_VERSION}/g" ./${MAJOR_RELEASE}/jre/alpine/Dockerfile
sed -i "s/ARG version=.*/ARG version=${CORRETTO_VERSION}/g" ./${MAJOR_RELEASE}/jre/alpine/Dockerfile
fi
jdk_version=$(echo ${CORRETTO_VERSION} | cut -d'.' -f1-3)
sed -i "" "s/${MAJOR_RELEASE}\.0\.[0-9]*-alpine/${jdk_version}-alpine/g" .tags
sed -i "s/${MAJOR_RELEASE}\.0\.[0-9]*-alpine/${jdk_version}-alpine/g" .tags

sed -i "" "s/${MAJOR_RELEASE}\.0\.[0-9]*-alpine/${jdk_version}-alpine/g" README.md
sed -i "s/${MAJOR_RELEASE}\.0\.[0-9]*-alpine/${jdk_version}-alpine/g" README.md
if [ -d "./${MAJOR_RELEASE}/slim" ]; then
sed -i "" "s/ARG version=.*/ARG version=${CORRETTO_VERSION}/g" ./${MAJOR_RELEASE}/slim/alpine/Dockerfile
sed -i "s/ARG version=.*/ARG version=${CORRETTO_VERSION}/g" ./${MAJOR_RELEASE}/slim/alpine/Dockerfile
fi
}

Expand All @@ -30,18 +30,18 @@ update_generic_linux() {
jdk_version=$(echo ${CORRETTO_VERSION} | cut -d'.' -f1-3)
jdk_build=$(echo ${CORRETTO_VERSION} | cut -d'.' -f4)
corretto_version=$(echo ${CORRETTO_VERSION} | cut -d'.' -f5)
sed -i "" "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}-${corretto_version}/g" ./${MAJOR_RELEASE}/jdk/al2/Dockerfile
sed -i "" "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}-${corretto_version}/g" ./${MAJOR_RELEASE}/jdk/debian/Dockerfile
sed -i "" "s/${MAJOR_RELEASE}\.0\.[0-9]*,/${jdk_version},/g" .tags
sed -i "" "s/${MAJOR_RELEASE}\.0\.[0-9]*-al2/${jdk_version}-al2/g" .tags
sed -i "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}-${corretto_version}/g" ./${MAJOR_RELEASE}/jdk/al2/Dockerfile
sed -i "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}-${corretto_version}/g" ./${MAJOR_RELEASE}/jdk/debian/Dockerfile
sed -i "s/${MAJOR_RELEASE}\.0\.[0-9]*,/${jdk_version},/g" .tags
sed -i "s/${MAJOR_RELEASE}\.0\.[0-9]*-al2/${jdk_version}-al2/g" .tags

sed -i "" "s/${MAJOR_RELEASE}\.0\.[0-9]*,/${jdk_version},/g" README.md
sed -i "" "s/${MAJOR_RELEASE}\.0\.[0-9]*-al2/${jdk_version}-al2/g" README.md
sed -i "s/${MAJOR_RELEASE}\.0\.[0-9]*,/${jdk_version},/g" README.md
sed -i "s/${MAJOR_RELEASE}\.0\.[0-9]*-al2/${jdk_version}-al2/g" README.md
if [ -d "./${MAJOR_RELEASE}/slim" ]; then
sed -i "" "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}-${corretto_version}/g" ./${MAJOR_RELEASE}/slim/al2/Dockerfile
sed -i "" "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}-${corretto_version}/g" ./${MAJOR_RELEASE}/slim/debian/Dockerfile
sed -i "" "s/${MAJOR_RELEASE}\.0\.[0-9]*-slim,/${jdk_version},/g" .tags
sed -i "" "s/${MAJOR_RELEASE}\.0\.[0-9]*-slim,/${jdk_version},/g" README.md
sed -i "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}-${corretto_version}/g" ./${MAJOR_RELEASE}/slim/al2/Dockerfile
sed -i "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}-${corretto_version}/g" ./${MAJOR_RELEASE}/slim/debian/Dockerfile
sed -i "s/${MAJOR_RELEASE}\.0\.[0-9]*-slim,/${jdk_version},/g" .tags
sed -i "s/${MAJOR_RELEASE}\.0\.[0-9]*-slim,/${jdk_version},/g" README.md
fi

}
Expand Down Expand Up @@ -78,13 +78,13 @@ if [ ! -z "${CORRETTO_8_GENERIC_LINUX}" ]; then
jdk_version=$(echo ${CORRETTO_8_GENERIC_LINUX} | cut -d'.' -f2)
jdk_build=$(echo ${CORRETTO_8_GENERIC_LINUX} | cut -d'.' -f3)
corretto_version=$(echo ${CORRETTO_8_GENERIC_LINUX} | cut -d'.' -f4)
sed -i "" "s/ARG version=.*/ARG version=1.8.0_${jdk_version}.b${jdk_build}-${corretto_version}/g" ./8/jdk/al2/Dockerfile
sed -i "" "s/ARG version=.*/ARG version=8.${jdk_version}.${jdk_build}-${corretto_version}/g" ./8/jdk/debian/Dockerfile
sed -i "" "s/8u[0-9]*,/8u${jdk_version},/g" .tags
sed -i "" "s/8u[0-9]*-al2/8u${jdk_version}-al2/g" .tags
sed -i "s/ARG version=.*/ARG version=1.8.0_${jdk_version}.b${jdk_build}-${corretto_version}/g" ./8/jdk/al2/Dockerfile
sed -i "s/ARG version=.*/ARG version=8.${jdk_version}.${jdk_build}-${corretto_version}/g" ./8/jdk/debian/Dockerfile
sed -i "s/8u[0-9]*,/8u${jdk_version},/g" .tags
sed -i "s/8u[0-9]*-al2/8u${jdk_version}-al2/g" .tags

sed -i "" "s/8u[0-9]*,/8u${jdk_version},/g" README.md
sed -i "" "s/8u[0-9]*-al2/8u${jdk_version}-al2/g" README.md
sed -i "s/8u[0-9]*,/8u${jdk_version},/g" README.md
sed -i "s/8u[0-9]*-al2/8u${jdk_version}-al2/g" README.md
fi

python3 bin/apply-template.py
5 changes: 5 additions & 0 deletions version.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"8": "8.302.08.1",
"11": "11.0.12.7.3:",
"16": "16.0.2.7.1"
}