Skip to content

Commit

Permalink
adjustment before review
Browse files Browse the repository at this point in the history
  • Loading branch information
dbadura committed Nov 20, 2024
1 parent 9788041 commit 3d68830
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 85 deletions.
16 changes: 8 additions & 8 deletions .github/scripts/create_changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@ echo "Previous release: ${PREVIOUS_RELEASE}"

echo "## What has changed" >> ${CHANGELOG_FILE}

git log ${PREVIOUS_RELEASE}..HEAD --pretty=tformat:"%h" --reverse | while read -r commit
git log "${PREVIOUS_RELEASE}"..HEAD --pretty=tformat:"%h" --reverse | while read -r COMMIT
do
COMMIT_AUTHOR=$(curl -H "${GITHUB_AUTH_HEADER}" -sS "${GITHUB_URL}/commits/${commit}" | jq -r '.author.login')
COMMIT_AUTHOR=$(curl -H "${GITHUB_AUTH_HEADER}" -sS "${GITHUB_URL}/commits/${COMMIT}" | jq -r '.author.login')
if [ "${COMMIT_AUTHOR}" != "kyma-bot" ]; then
git show -s ${commit} --format="* %s by @${COMMIT_AUTHOR}" >> ${CHANGELOG_FILE}
git show -s "${COMMIT}" --format="* %s by @${COMMIT_AUTHOR}" >> ${CHANGELOG_FILE}
fi
done

NEW_CONTRIB=$$.new
NEW_CONTRIB=$(mktemp --suffix=.new XXXXX)

join -v2 \
<(curl -H "${GITHUB_AUTH_HEADER}" -sS "${GITHUB_URL}/compare/$(git rev-list --max-parents=0 HEAD)...${PREVIOUS_RELEASE}" | jq -r '.commits[].author.login' | sort -u) \
<(curl -H "${GITHUB_AUTH_HEADER}" -sS "${GITHUB_URL}/compare/${PREVIOUS_RELEASE}...HEAD" | jq -r '.commits[].author.login' | sort -u) >${NEW_CONTRIB}
<(curl -H "${GITHUB_AUTH_HEADER}" -sS "${GITHUB_URL}/compare/${PREVIOUS_RELEASE}...HEAD" | jq -r '.commits[].author.login' | sort -u) >"${NEW_CONTRIB}"

if [ -s ${NEW_CONTRIB} ]
if [ -s "${NEW_CONTRIB}" ]
then
echo -e "\n## New contributors" >> ${CHANGELOG_FILE}
while read -r user
Expand All @@ -47,10 +47,10 @@ then
REF_PR=" in ${REF_PR}"
fi
echo "* @${user} made first contribution${REF_PR}" >> ${CHANGELOG_FILE}
done <${NEW_CONTRIB}
done <"${NEW_CONTRIB}"
fi

echo -e "\n**Full changelog**: https://github.com/$REPOSITORY/compare/${PREVIOUS_RELEASE}...${RELEASE_TAG}" >> ${CHANGELOG_FILE}

# cleanup
rm ${NEW_CONTRIB} || echo "cleaned up"
rm "${NEW_CONTRIB}" || echo "cleaned up"
27 changes: 0 additions & 27 deletions .github/scripts/verify-actions-status.sh

This file was deleted.

5 changes: 2 additions & 3 deletions .github/workflows/busola-backend-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ on:
inputs:
tag:
description: "Additional tag for built images"
required: false
required: true
type: string
# default: latest
push:
branches:
- main
Expand All @@ -32,4 +31,4 @@ jobs:
with:
name: busola-backend
dockerfile: Dockerfile
tags: ${{ inputs.tag }}
tags: ${{ inputs.tag != '' && inputs.tag || 'latest' }}
1 change: 0 additions & 1 deletion .github/workflows/busola-web-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
description: "Additional tag for built images"
required: true
type: string
default: latest
push:
branches:
- main
Expand Down
46 changes: 0 additions & 46 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,51 +17,6 @@ permissions: # used by build images steps
contents: write # This is required for actions/checkout and builds

jobs:
# TODO: Do we need this check? Our tests on main depends on what have changed.
# verify-head-status:
# name: Verify HEAD
# runs-on: ubuntu-latest
#
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
#
# - name: Verify github actions
# run: ./.github/scripts/verify-actions-status.sh ${{ github.ref_name }}

# TODO: This steps cannot be executed on fork, so I need to adjust them later
# upgrade-images:
# name: Upgrade main images
# needs: verify-head-status
# runs-on: ubuntu-latest
#
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# with:
# token: ${{ secrets.BOT_TOKEN }}
# fetch-depth: 0

# - name: Bump values.yaml
# run: |
# ./hack/replace_serverless_chart_images.sh all .
# env:
# IMG_DIRECTORY: "prod"
# IMG_VERSION: ${{ github.event.inputs.name }}
# PROJECT_ROOT: "."
#
#
# - name: Commit&Push
# run: |
# git config --local user.email "[email protected]"
# git config --local user.name "ottersbot"
#
# git add .
# git commit --allow-empty -m "upgrade dependencies"
# git push origin ${{ github.ref_name }}

build-web:
name: Build Busola web
uses: ./.github/workflows/busola-web-build.yml
Expand All @@ -73,7 +28,6 @@ jobs:
with:
tag: ${{ github.event.inputs.name }}

# TODO: Run integration tests?
# integrations:
# needs: create-draft
# secrets: inherit
Expand Down

0 comments on commit 3d68830

Please sign in to comment.