2022-12-23 12:37:05 +01:00
|
|
|
name: GetMoarFediverse
|
|
|
|
description: Runs GetMoarFediverse in GitHub actions
|
2022-12-23 19:08:15 +01:00
|
|
|
branding:
|
|
|
|
icon: activity
|
|
|
|
color: green
|
2022-12-23 12:37:05 +01:00
|
|
|
inputs:
|
|
|
|
config_file:
|
|
|
|
description: Path to the config.json
|
|
|
|
required: true
|
|
|
|
api_key:
|
|
|
|
description: FakeRelay API key if it isn't defined in the config.json
|
2022-12-23 13:25:48 +01:00
|
|
|
executable_path:
|
|
|
|
description: Path to the GetMoarFediverse archive
|
2022-12-23 12:37:05 +01:00
|
|
|
required: true
|
2022-12-23 13:25:48 +01:00
|
|
|
default: https://github.com/g3rv4/GetMoarFediverse/releases/latest/download/GetMoarFediverse_linux-x64.tgz
|
2022-12-23 12:37:05 +01:00
|
|
|
runs:
|
|
|
|
using: composite
|
|
|
|
steps:
|
|
|
|
- name: create tmp dir
|
|
|
|
id: mktemp
|
|
|
|
run: echo "MOAR_TMP_DIR=$(mktemp -d)" >> $GITHUB_ENV
|
|
|
|
shell: bash
|
|
|
|
- name: copy config
|
|
|
|
run: cp ${{ inputs.config_file }} ${MOAR_TMP_DIR}/config.json
|
|
|
|
shell: bash
|
|
|
|
- name: download artifact
|
|
|
|
uses: dawidd6/action-download-artifact@v2
|
|
|
|
with:
|
|
|
|
name: moar-imported
|
|
|
|
path: ${{ env.MOAR_TMP_DIR }}
|
|
|
|
if_no_artifact_found: warn
|
|
|
|
- name: import-data
|
|
|
|
env:
|
|
|
|
FAKERELAY_APIKEY: ${{ inputs.api_key }}
|
2022-12-23 13:25:48 +01:00
|
|
|
run: |
|
|
|
|
wget -nv ${{ inputs.executable_path }}
|
|
|
|
tar -xzf GetMoarFediverse_linux-x64.tgz
|
|
|
|
cd GetMoarFediverse-*
|
|
|
|
./GetMoarFediverse ${{ env.MOAR_TMP_DIR }}/config.json
|
2022-12-23 12:37:05 +01:00
|
|
|
shell: bash
|
|
|
|
- name: store artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: moar-imported
|
|
|
|
path: ${{ env.MOAR_TMP_DIR }}/imported.txt
|