Update Controller Mappings #80
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Update Controller Mappings | |
on: | |
schedule: | |
- cron: '0 16 * * 0' | |
workflow_dispatch: | |
jobs: | |
update-vulkan-loader: | |
name: Update Controller Mappings | |
if: github.repository == 'GamesTrap/TRAP' | |
runs-on: [self-hosted, Linux, X64, ubuntu, cpu] | |
steps: | |
- name: Cleanup workspace | |
if: ${{ always() }} | |
uses: gamestrap/[email protected] | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'false' | |
ref: dev | |
- uses: crazy-max/ghaction-import-gpg@v6 | |
with: | |
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
git_user_signingkey: true | |
git_commit_gpgsign: true | |
git_committer_name: TRAP CI/CD | |
- name: Make python3 available as python | |
run: sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 10 | |
- name: Make pip3 available as pip | |
run: sudo update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 10 | |
- uses: actions/create-github-app-token@v1 | |
id: generate-token | |
with: | |
app-id: ${{ secrets.APP_ID }} | |
private-key: ${{ secrets.APP_PRIVATE_KEY }} | |
- name: Make scripts and premake executable | |
run: | | |
chmod +x libs/premake5/linux/premake5 | |
chmod +x GeneratorScripts/GenerateControllerMappings.sh | |
- name: Update Controller Mappings | |
run: | | |
cd GeneratorScripts/ | |
./GenerateControllerMappings.sh | |
cd .. | |
- name: Retrieve todays date | |
id: get-date | |
run: echo "CURRENT_DATE=$(date '+%Y-%m-%d')" >> "$GITHUB_OUTPUT" | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
base: dev | |
branch: controller-mappings-update/${{steps.get-date.outputs.CURRENT_DATE}} | |
delete-branch: true | |
commit-message: "Update Controller Mappings to ${{steps.get-date.outputs.CURRENT_DATE}}" | |
title: "Update Controller Mappings to ${{steps.get-date.outputs.CURRENT_DATE}}" | |
labels: "CI/CD, Input, Update" | |
assignees: "GamesTrap" | |
milestone: 5 | |
token: ${{steps.generate-token.outputs.token}} | |
author: "TRAP CI/CD <[email protected]>" | |
committer: "TRAP CI/CD <[email protected]>" |