mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
Rework helm release process
This was mostly me working around a limitation in chart-releaser where it does not allow for uploading a chart to an existing release.
This commit is contained in:
43
.github/workflows/helm-release.yaml
vendored
43
.github/workflows/helm-release.yaml
vendored
@@ -1,43 +0,0 @@
|
||||
---
|
||||
name: helm-release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config user.name "$GITHUB_ACTOR"
|
||||
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
||||
|
||||
- name: Install Helm
|
||||
uses: azure/setup-helm@v1
|
||||
with:
|
||||
version: v3.7.1
|
||||
|
||||
- name: Create Helm chart
|
||||
run: |
|
||||
echo VERSION: $VERSION
|
||||
make helm-chart
|
||||
env:
|
||||
VERSION: ${{ github.ref_name }}
|
||||
|
||||
# Reinventing the wheel if/until https://github.com/helm/chart-releaser-action/pull/96 is merged
|
||||
- name: Release Helm chart
|
||||
run: |
|
||||
echo VERSION: $VERSION
|
||||
make helm-release
|
||||
env:
|
||||
VERSION: ${{ github.ref_name }}
|
||||
CR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_REPO_OWNER: ${{ github.repository_owner }}
|
||||
15
.github/workflows/promote.yaml
vendored
15
.github/workflows/promote.yaml
vendored
@@ -8,6 +8,8 @@ jobs:
|
||||
promote:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Log in to GHCR
|
||||
run: |
|
||||
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||
@@ -23,3 +25,16 @@ jobs:
|
||||
docker tag ghcr.io/${{ github.repository }}:${{ github.event.release.tag_name }} quay.io/${{ github.repository }}:latest
|
||||
docker push quay.io/${{ github.repository }}:${{ github.event.release.tag_name }}
|
||||
docker push quay.io/${{ github.repository }}:latest
|
||||
|
||||
- name: Configure git
|
||||
run: |
|
||||
git config user.name "$GITHUB_ACTOR"
|
||||
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
||||
|
||||
- name: Release Helm chart
|
||||
run: |
|
||||
ansible-playbook ansible/helm-release.yml -v \
|
||||
-e operator_image=quay.io/${{ github.repository }} \
|
||||
-e chart_owner=${{ github.repository_owner }} \
|
||||
-e tag=${{ github.event.release.tag_name }} \
|
||||
-e gh_token=${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user