Skip to content

Commit

Permalink
update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadair committed Dec 5, 2024
1 parent 5b1bba9 commit a7fa205
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ jobs:
- run: python -m pip install PyYAML click
- run: echo $LOAD_BUILD_TARGETS_SCRIPT | base64 --decode > load_build_targets.py
env:
LOAD_BUILD_TARGETS_SCRIPT: aW1wb3J0IGpzb24KaW1wb3J0IG9zCmltcG9ydCByZQoKaW1wb3J0IGNsaWNrCmltcG9ydCB5YW1sCgpNQUNISU5FX1RZUEUgPSB7CiAgICAibGludXgiOiAidWJ1bnR1LWxhdGVzdCIsCiAgICAibWFjb3MiOiAibWFjb3MtMTIiLAogICAgIndpbmRvd3MiOiAid2luZG93cy1sYXRlc3QiLAp9Ck0xX1JVTk5FUiA9ICJtYWNvcy0xNCIKCkNJQldfQlVJTEQgPSBvcy5lbnZpcm9uLmdldCgiQ0lCV19CVUlMRCIsICIqIikKQ0lCV19BUkNIUyA9IG9zLmVudmlyb24uZ2V0KCJDSUJXX0FSQ0hTIiwgImF1dG8iKQoKCkBjbGljay5jb21tYW5kKCkKQGNsaWNrLm9wdGlvbigiLS10YXJnZXRzIiwgZGVmYXVsdD0iIikKZGVmIGxvYWRfYnVpbGRfdGFyZ2V0cyh0YXJnZXRzKToKICAgICIiIlNjcmlwdCB0byBsb2FkIGNpYnVpbGR3aGVlbCB0YXJnZXRzIGZvciBHaXRIdWIgQWN0aW9ucyB3b3JrZmxvdy4iIiIKICAgICMgTG9hZCBsaXN0IG9mIHRhcmdldHMKICAgIHRhcmdldHMgPSB5YW1sLmxvYWQodGFyZ2V0cywgTG9hZGVyPXlhbWwuQmFzZUxvYWRlcikKICAgIHByaW50KGpzb24uZHVtcHModGFyZ2V0cywgaW5kZW50PTIpKQoKICAgICMgQ3JlYXRlIG1hdHJpeAogICAgbWF0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SwKICAgICAgICAiQ0lCV19CVUlMRCI6IGdldF9jaWJ3X2J1aWxkKHRhcmdldCksCiAgICAgICAgIkNJQldfQVJDSFMiOiBnZXRfY2lid19hcmNocyh0YXJnZXQpLAogICAgICAgICJhcnRpZmFjdC1uYW1lIjogZ2V0X2FydGlmYWN0X25hbWUodGFyZ2V0KSwKICAgICAgICAqKmV4dHJhX3RhcmdldF9hcmdzLAogICAgfQoKCmlmIF9fbmFtZV9fID09ICJfX21haW5fXyI6CiAgICBsb2FkX2J1aWxkX3RhcmdldHMoKQo=
- id: set-outputs
run: python load_build_targets.py --targets "${{ inputs.targets }}"
shell: sh
Expand Down

0 comments on commit a7fa205

Please sign in to comment.