WORKFLOW: testing the new version injector

This commit is contained in:
XargonWan 2024-08-02 11:47:48 +09:00
parent a569c9c9db
commit c37a7ae109

View file

@ -4,25 +4,20 @@ on:
push: push:
branches: branches:
- retrodeck-main - retrodeck-main
- feat/*
workflow_dispatch: workflow_dispatch:
jobs: jobs:
Building_RetroDECK-ES-DE: Building_RetroDECK-ES-DE:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# Circumventing this bug: https://github.com/flatpak/flatpak-builder/issues/317 - name: Clone RetroDECK repo
# - name: Remove stuck mounts
# run: sudo umount -f /home/ubuntu/es-de-runner/_work/RetroDECK-ES-DE/RetroDECK-ES-DE/.flatpak-builder/rofiles/*
# continue-on-error: true
- name: Clone repo
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
submodules: 'true' submodules: 'true'
token: ${{ secrets.TRIGGER_BUILD_TOKEN }} token: ${{ secrets.TRIGGER_BUILD_TOKEN }}
fetch-depth: 1
- name: "Install dependencies" - name: "Install dependencies"
run: "automation_tools/install_dependencies.sh" run: "automation_tools/install_dependencies.sh"
@ -79,28 +74,35 @@ jobs:
artifacts: "RetroDECK-ES-DE-Artifact.tar.gz, tree.html" artifacts: "RetroDECK-ES-DE-Artifact.tar.gz, tree.html"
allowUpdates: true allowUpdates: true
makeLatest: true makeLatest: ${{ contains(env.BRANCH_NAME, 'feat/') && 'false' || 'true' }}
token: ${{ secrets.TRIGGER_BUILD_TOKEN }} token: ${{ secrets.TRIGGER_BUILD_TOKEN }}
continue-on-error: true continue-on-error: true
# - name: "Committing changes" - name: Clone Cooker repo
# with: uses: actions/checkout@v3
# github_token: ${{ secrets.TRIGGER_BUILD_TOKEN }} with:
# run: | repository: RetroDECK/Cooker
# git config user.name "GitHub Actions" submodules: 'true'
# git config user.email "actions@github.com" token: ${{ secrets.TRIGGER_BUILD_TOKEN }}
# git add * net.retrodeck.es-de.yml path: cooker
# git commit -m '[AUTOMATED] Updating ES-DE after build [skip ci]' fetch-depth: 1
# git push origin main
# continue-on-error: true # TODO: would be good to update the manifest but it's broken
- name: GitHub Commit & Push - name: "Update RetroDECK Cooker manifest with new artifact URL and SHA256"
uses: actions-js/push@v1.4 if: contains(env.BRANCH_NAME, 'feat/') == false
with: run: |
github_token: ${{ secrets.TRIGGER_BUILD_TOKEN }} NEW_URL="https://github.com/RetroDECK/ES-DE/releases/download/${{env.BRANCH_NAME}}-${{env.DATE}}/RetroDECK-ES-DE-Artifact.tar.gz"
message: '[AUTOMATED] Updating ES-DE after build [skip ci]' NEW_SHA256=$(cat ${GITHUB_WORKSPACE}/RetroDECK-Artifact-cooker.sha)
branch: retrodeck-main
continue-on-error: true # TODO: would be good to update the manifest but it's broken
yq e -i '.modules[] | select(.name == "ES-DE") | .sources[0].url = strenv(NEW_URL)' cooker/net.retrodeck.retrodeck.yml
yq e -i '.modules[] | select(.name == "ES-DE") | .sources[0].sha256 = strenv(NEW_SHA256)' cooker/net.retrodeck.retrodeck.yml
- name: Commit and push changes to Cooker repo
if: contains(env.BRANCH_NAME, 'feat/') == false
run: |
cd cooker
git config user.name "GitHub Actions"
git config user.email "actions@github.com"
git add net.retrodeck.retrodeck.yml
git commit -m "ES-DE: updated module with new artifact URL and SHA256 [skip ci]"
git push origin HEAD