Skip to content

Commit

Permalink
Add make step
Browse files Browse the repository at this point in the history
  • Loading branch information
jriguera committed Mar 13, 2024
1 parent a580d69 commit eb6a2a3
Showing 1 changed file with 18 additions and 16 deletions.
34 changes: 18 additions & 16 deletions .github/workflows/release-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,18 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Run make
run: |
# This step is not needed per se, but runs all the tests
# and generate the manifests
make && cp -v config/crd/bases/* charts/mimirrules-controller/crds/
- name: Set up Helm
uses: azure/setup-helm@v4
Expand All @@ -89,18 +95,14 @@ jobs:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_SKIP_EXISTING: "true"

# - name: Login to GitHub Container Registry
# uses: docker/login-action@v3
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}

- name: Push charts to GHCR
run: |
shopt -s nullglob
echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io/${GITHUB_REPOSITORY_OWNER} --username ${{ github.actor }} --password-stdin
for pkg in .cr-release-packages/*; do
[ -z "${pkg:-}" ] && break
helm push "${pkg}" "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts" || echo "::warning title=Helm push::Helm push artifact to GH Registry has failed!"
done
shopt -s nullglob
helm registry login ghcr.io/${GITHUB_REPOSITORY_OWNER} --username ${{ github.actor }} --password $TOKEN
for pkg in $(shopt -s nullglob;echo .cr-release-packages/*)
do
[ -z "${pkg:-}" ] && break
helm push "${pkg}" "oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts" || echo "::warning title=Helm push::Helm push artifact to GH Registry has failed!"
done
env:
TOKEN: "${{ secrets.GITHUB_TOKEN }}"

0 comments on commit eb6a2a3

Please sign in to comment.