Skip to content

test

test #199

Workflow file for this run

name: Release a chart
on:
push:
branches:
- master
- test/pipeline-ordering
jobs:
release-core:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: master
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Helm tool installer
uses: azure/setup-helm@v1
with:
version: '3.5.4'
id: install
- name: Add dependency chart repos
run: |
helm repo add ecovadis https://ecovadiscode.github.io/charts/
- name: Isolate core chart for release
run: |
mkdir -p _core-release
cp -r charts/core _core-release/core
- name: Run chart-releaser for core
uses: helm/chart-releaser-action@v1.4.0
with:
charts_dir: "_core-release"
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
release-remaining:
needs: release-core
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: master
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
- name: Helm tool installer
uses: azure/setup-helm@v1
with:
version: '3.5.4'
id: install
- name: Add dependency chart repos
run: |
helm repo add ecovadis https://ecovadiscode.github.io/charts/
- name: Wait for core chart availability in Helm repo
run: |
CORE_VERSION=$(grep '^version:' charts/core/Chart.yaml | awk '{print $2}')
echo "Waiting for charts-core ${CORE_VERSION} to be available..."
for i in $(seq 1 30); do
helm repo update 2>/dev/null
if helm search repo ecovadis/charts-core --version "${CORE_VERSION}" | grep -q "${CORE_VERSION}"; then
echo "charts-core ${CORE_VERSION} is available!"
exit 0
fi
echo "Attempt ${i}/30 - not yet available, waiting 10s..."
sleep 10
done
echo "Timeout waiting for charts-core ${CORE_VERSION} after 5 minutes"
exit 1
- name: Run chart-releaser for remaining charts
uses: helm/chart-releaser-action@v1.4.0
with:
charts_dir: "charts"
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"