Skip to content

Commit

Permalink
Another step
Browse files Browse the repository at this point in the history
  • Loading branch information
adamkpickering committed Mar 9, 2024
1 parent e9528bf commit cf786cc
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 42 deletions.
42 changes: 0 additions & 42 deletions .github/workflows/release.yaml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/update-main-source.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Auto-update charts

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Configure git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Update main-source branch
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_WORKFLOW: ${{ github.workflow }}
GITHUB_REPOSITORY: ${{ github.repository }}
run: |
scripts/pull-ci-scripts
BRANCH="auto-update/$(date '+%s')"
git checkout -b "$BRANCH"
bin/partner-charts-ci auto
git push --set-upstream origin "$BRANCH"
TITLE="Auto-update charts on main-source"
BODY="This PR was created by the \"$GITHUB_WORKFLOW\" workflow. It auto-updates the helm charts on the main-source branch."
gh pr create --repo "$GITHUB_REPOSITORY" --base main-source --head "$BRANCH" --title "$TITLE" --body "$BODY"
29 changes: 29 additions & 0 deletions .github/workflows/update-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Update main branch from main-source

on:
workflow_dispatch:
push:
branches:
- main-source

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main

- name: Configure git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Update main branch with latest from main-source
run: |
# checkout action only fetches main, so we need to fetch main-source
git fetch origin main-source --depth 1
git rm -r assets index.yaml
git checkout main-source -- assets index.yaml
git commit -m "Update partner charts"
git push origin

0 comments on commit cf786cc

Please sign in to comment.