Skip to content

Commit

Permalink
Add workflow to update stable branch and funding
Browse files Browse the repository at this point in the history
- Add funding button
- Add workflow to update mamolinux/stable branch
  • Loading branch information
hsbasu committed Jul 23, 2022
1 parent 9914b16 commit 1120bf4
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: hsbasu # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
50 changes: 50 additions & 0 deletions .github/workflows/update-stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Automatically fetch and merge latest tag to mamolinux/stable for new stable releases
name: Update mamolinux/stable branch

# Controls when the action will run.
on:
schedule:
# scheduled every day at 00:00
- cron: '0 0 */1 * *'

workflow_dispatch: # on button click
inputs:
branch:
description: 'Branch to merge to'
required: true
default: 'mamolinux/stable' # set the branch to merge to

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "sync-new-release"
sync-new-release:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@master
with:
fetch-depth: 0

# Set default branches when run as scheduled job
- name: Set the branches
env:
DEFAULT_UPSTREAM_BRANCH: 'master' # set the upstream branch to merge from
DEFAULT_BRANCH: 'mamolinux/stable' # set the branch to merge to
run: |
git checkout ${{ env.DEFAULT_UPSTREAM_BRANCH }}
echo "latest-tag=`git describe --abbrev=0 --tags`" >> $GITHUB_ENV
echo "branch=${{ github.event.inputs.branch || env.DEFAULT_BRANCH }}" >> $GITHUB_ENV
- name: Set Git config
run: |
git config --local user.email "[email protected]"
git config --local user.name "Github Actions"
- name: Update mamolinux/stable for new release
run: |
git checkout ${{ env.branch }}
git merge --ff-only ${{ env.latest-tag }}
git push -f

0 comments on commit 1120bf4

Please sign in to comment.