Skip to content

Commit

Permalink
Merge branch 'main' into feat/init-containers
Browse files Browse the repository at this point in the history
  • Loading branch information
kimxogus committed Apr 4, 2024
2 parents 0457580 + a9b9c81 commit d8da1a0
Show file tree
Hide file tree
Showing 44 changed files with 1,330 additions and 1,217 deletions.
36 changes: 36 additions & 0 deletions .github/release.yml
@@ -0,0 +1,36 @@
# .github/release.yml

changelog:
exclude:
labels:
- release-note/ignore-for-release
authors:
- octocat
categories:
- title: Exciting New Features 🎉
labels:
- release-note/new-feature
- title: Enhancement 🚀
labels:
- release-note/enhancement
- title: Component updates ⬆️
labels:
- release-note/update
- title: Docs update 🗄️
labels:
- release-note/docs
- title: Community update 🧑🏻‍🤝‍🧑🏾
labels:
- release-note/community

- title: Breaking Changes 🛠
labels:
- release-note/breaking-change

- title: Deprecations ❌
labels:
- release-note/deprecation

- title: Other Changes
labels:
- "*"
26 changes: 26 additions & 0 deletions .github/workflows/housekeeping-stale-issues-prs.yaml
@@ -0,0 +1,26 @@
name: Housekeeping - Close stale issues and PRs
on:
schedule:
- cron: '0 9 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9.0.0
with:
stale-issue-message: 'This issue is being marked stale due to a period of inactivity. If this issue is still relevant, please comment or remove the stale label. Otherwise, this issue will close in 30 days.'
stale-pr-message: 'This PR is being marked stale due to a period of inactivty. If this PR is still relevant, please comment or remove the stale label. Otherwise, this PR will close in 30 days.'
close-issue-message: 'This issue was closed because it has been stalled for 30 days with no activity. If this issue is still relevant, please re-open a new issue.'
close-pr-message: 'This PR was closed because it has been stalled for 30 days with no activity. If this PR is still relevant, please re-open a new PR against main.'
days-before-issue-stale: 60
days-before-pr-stale: 60
days-before-issue-close: 30
days-before-pr-close: 30
# Don't add stale label to PRs / issues with milestones "upcoming" attached.
exempt-milestones: "upcoming"
# Don't add stale label to PRs / issues with this label
exempt-issue-labels: 'never-stale, kind/requirement'
exempt-pr-labels: 'never-stale, kind/requirement'
# Make it 1000 to clean up a bit then wen can lower it
operations-per-run: 1000
5 changes: 2 additions & 3 deletions .github/workflows/integration.yaml
Expand Up @@ -24,7 +24,7 @@ jobs:

- name: Install Nginx ingress controller
run: |
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.0.3/deploy/static/provider/kind/deploy.yaml
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.9.0/deploy/static/provider/kind/deploy.yaml
kubectl wait --namespace ingress-nginx --for=condition=ready pod --selector=app.kubernetes.io/component=controller --timeout=120s
- name: Set up Go 1.19
Expand All @@ -43,7 +43,6 @@ jobs:
- name: Set /etc/hosts
run: |
sudo -- sh -c "echo '127.0.0.1 harbor.local' >> /etc/hosts"
sudo -- sh -c "echo '127.0.0.1 notary.harbor.local' >> /etc/hosts"
- name: Run integration tests
working-directory: ./test
Expand All @@ -56,7 +55,7 @@ jobs:
df -h
free -m
mkdir -p /tmp/harbor
for name in core jobservice registry registryctl trivy notaryserver notarysigner portal redis database; do \
for name in core jobservice registry registryctl trivy portal redis database; do \
kubectl -n default logs -l "component=$name" --all-containers > /tmp/harbor/$name.log ; \
done
Expand Down
47 changes: 47 additions & 0 deletions .github/workflows/publish_release.yaml
@@ -0,0 +1,47 @@
name: Publish Release

on:
push:
tags:
- 'v*.*.*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: Setup Helm
uses: azure/setup-helm@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
id: install
- name: Helm Package
run: echo "PACKAGE_PATH=$(helm package . | awk '{print $NF}')" >> $GITHUB_ENV
- name: Publish Helm Chart
run: |
helm registry login registry-1.docker.io -u ${{ secrets.DOCKER_HUB_USERNAME }} -p ${{ secrets.DOCKER_HUB_PASSWORD }}
helm push ${{ env.PACKAGE_PATH }} oci://registry-1.docker.io/${{ secrets.DOCKER_HUB_USERNAME }}
helm registry login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }}
helm push ${{ env.PACKAGE_PATH }} oci://ghcr.io/${{ github.actor }}
- name: Upload to chart repository
run: |
git config --global user.email "${{ github.event.repository.name }}@users.noreply.github.com"
git config --global user.name "${{ github.event.repository.name }} CI"
git fetch origin chart-repository
git checkout chart-repository
mkdir -p ../helm-temp
cd ../helm-temp
cp ${{ env.PACKAGE_PATH }} .
helm repo index --merge ../harbor-helm/index.yaml .
mv ./* ../harbor-helm
cd ../harbor-helm
git add .
git commit -s -m "feat: Upload Harbor ${{ github.ref }} to chart repository"
git push origin chart-repository
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ${{ env.PACKAGE_PATH }}
2 changes: 1 addition & 1 deletion Chart.yaml
Expand Up @@ -8,7 +8,7 @@ keywords:
- registry
- harbor
home: https://goharbor.io
icon: https://raw.githubusercontent.com/goharbor/website/master/static/img/logos/harbor-icon-color.png
icon: https://raw.githubusercontent.com/goharbor/website/main/static/img/logos/harbor-icon-color.png
sources:
- https://github.com/goharbor/harbor
- https://github.com/goharbor/harbor-helm
Expand Down

0 comments on commit d8da1a0

Please sign in to comment.