feat: update actions
This commit is contained in:
@@ -21,7 +21,7 @@ jobs:
|
|||||||
- name: Container image name
|
- name: Container image name
|
||||||
run: |
|
run: |
|
||||||
owner=$(echo "${GITHUB_REPOSITORY_OWNER}" | tr '[:upper:]' '[:lower:]')
|
owner=$(echo "${GITHUB_REPOSITORY_OWNER}" | tr '[:upper:]' '[:lower:]')
|
||||||
echo "IMAGE_NAME=${REGISTRY_HOST}/kloude/kks/provider-plugin" >> "$GITHUB_ENV"
|
echo "IMAGE_NAME=${REGISTRY_HOST}/kloude/kks-provider-plugin" >> "$GITHUB_ENV"
|
||||||
echo "APP_VERSION=$(grep '^appVersion:' charts/kks-provider-plugin/Chart.yaml | awk '{print $2}' | tr -d '\"')" >> "$GITHUB_ENV"
|
echo "APP_VERSION=$(grep '^appVersion:' charts/kks-provider-plugin/Chart.yaml | awk '{print $2}' | tr -d '\"')" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- uses: docker/setup-buildx-action@v3
|
- uses: docker/setup-buildx-action@v3
|
||||||
|
|||||||
@@ -40,10 +40,10 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
|
|
||||||
- name: Log in to GHCR
|
- name: Log in to registry
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: registry.kloude.ir
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
@@ -55,14 +55,12 @@ jobs:
|
|||||||
echo "No packaged charts to push"
|
echo "No packaged charts to push"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
owner=$(echo "${GITHUB_REPOSITORY_OWNER}" | tr '[:upper:]' '[:lower:]')
|
|
||||||
for chart in "${charts[@]}"; do
|
for chart in "${charts[@]}"; do
|
||||||
helm push "$chart" "oci://ghcr.io/${owner}/charts"
|
helm push "$chart" "oci://registry.kloude.ir/kloude/kks-provider-plugin-charts"
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Make OCI chart public
|
- name: Make OCI chart public
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
owner=$(echo "${GITHUB_REPOSITORY_OWNER}" | tr '[:upper:]' '[:lower:]')
|
gh api --method PATCH "/orgs/kloude/kks-provider-plugin/packages/container/charts%2Fkks-provider-plugin/visibility" -f visibility=public || true
|
||||||
gh api --method PATCH "/orgs/${owner}/packages/container/charts%2Fkks-provider-plugin/visibility" -f visibility=public || true
|
|
||||||
|
|||||||
@@ -92,11 +92,11 @@ jobs:
|
|||||||
TAG: ${{ github.ref_name }}
|
TAG: ${{ github.ref_name }}
|
||||||
run: gh release upload "$TAG" "$CHART_PACKAGE" --clobber
|
run: gh release upload "$TAG" "$CHART_PACKAGE" --clobber
|
||||||
|
|
||||||
- name: Log in to GHCR
|
- name: Log in to registry
|
||||||
if: steps.version.outputs.is_app_release == 'true'
|
if: steps.version.outputs.is_app_release == 'true'
|
||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ghcr.io
|
registry: registry.kloude.ir
|
||||||
username: ${{ github.actor }}
|
username: ${{ github.actor }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ jobs:
|
|||||||
if: steps.version.outputs.is_app_release == 'true'
|
if: steps.version.outputs.is_app_release == 'true'
|
||||||
run: |
|
run: |
|
||||||
owner=$(echo "${GITHUB_REPOSITORY_OWNER}" | tr '[:upper:]' '[:lower:]')
|
owner=$(echo "${GITHUB_REPOSITORY_OWNER}" | tr '[:upper:]' '[:lower:]')
|
||||||
helm push "$CHART_PACKAGE" "oci://ghcr.io/${owner}/charts"
|
helm push "$CHART_PACKAGE" "oci://registry.kloude.ir/kloude/kks-provider-plugin-charts"
|
||||||
|
|
||||||
- name: Make OCI chart public
|
- name: Make OCI chart public
|
||||||
if: steps.version.outputs.is_app_release == 'true'
|
if: steps.version.outputs.is_app_release == 'true'
|
||||||
|
|||||||
Reference in New Issue
Block a user