Skip to content

update_theme_history #28

update_theme_history

update_theme_history #28

name: update_theme_history
# Controls when the action will run.
on:
# Triggers the workflow once a day
schedule:
- cron: '39 18 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
check_theme_history:
# The type of runner that the job will run on
runs-on: ubuntu-latest
outputs:
keepgoing: ${{ steps.checkthemeversion.outputs.keepgoing }}
latestreleasedversion: ${{ steps.checkthemeversion.outputs.latestreleasedversion }}
# 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@v4
- name: Check if theme is up to date
id: checkthemeversion
run: |
bin/checktheme.sh 1.47.1
shell: bash
update_theme_history:
# The type of runner that the job will run on
runs-on: ubuntu-latest
needs: check_theme_history
if: ${{ needs.check_theme_history.outputs.keepgoing != 'false' }}
# get the latest released version number from the check script
env:
LATEST_RELEASED_VERSION: ${{needs.check_theme_history.outputs.latestreleasedversion}}
# 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@v4
- name: Debug update theme
run: |
echo "ran update_theme_history"
echo $LATEST_RELEASED_VERSION
pwd
tree -d ..
shell: bash
- name: Pull down needed repos, set up git
run: |
git clone --depth 1 https://x-access-token@${{ secrets.PAT_FOR_COMMITS }}@github.com/fusionauth/fusionauth-theme-history fusionauth-theme-history
cd fusionauth-theme-history
git pull --tags
git config user.name github-actions
git config user.email [email protected]
git remote set-url origin https://x-access-token:${{ secrets.GH_PAT_TOKEN }}@github.com/fusionauth/fusionauth-theme-history
echo $LATEST_RELEASED_VERSION
git tag test-dan
git push origin --tags
shell: bash
#
# - name: Start FusionAuth
# uses: fusionauth/fusionauth-github-action@v1
# with:
# FUSIONAUTH_VERSION: ${{needs.check_theme_history.outputs.latestreleasedversion}}
# FUSIONAUTH_APP_KICKSTART_FILENAME: ks.json
# FUSIONAUTH_APP_KICKSTART_DIRECTORY_PATH: ks
# - name: Wait for FusionAuth to be up
# run: |
# sleep 15
# curl -vv http://localhost:9011/api/status -H 'Authorization: 4737ea8520bd454caabb7cb3d36e14bc1832c0d3f70a4189b82598670f11b1bdEXAMPLE'
# shell: bash
#
# - name: Download theme
# run: |
# bin/pulltheme.sh
# bin/pushtheme.sh $LATEST_RELEASED_VERSION
# shell: bash
#