diff --git a/.github/workflows/claim.yml b/.github/workflows/claim.yml new file mode 100644 index 0000000..5162c29 --- /dev/null +++ b/.github/workflows/claim.yml @@ -0,0 +1,33 @@ +name: EFC +on: + workflow_dispatch: + schedule: + - cron: "0 18 * * 4" + +jobs: + EFC: + name: Claim Freebie + runs-on: ubuntu-latest + steps: + - name: Setup data folder + env: + EG_AUTH_JSON: ${{ secrets.EG_AUTH_JSON }} + run: | + mkdir "$GITHUB_WORKSPACE/data" + echo "$EG_AUTH_JSON" > $GITHUB_WORKSPACE/data/device_auths.json + wget https://raw.githubusercontent.com/Revadike/epicgames-freebies-claimer/master/data/config.example.json \ + -O "$GITHUB_WORKSPACE/data/config.example.json" + + - name: Setup config file + env: + EG_CONFIG_JSON: ${{ secrets.EG_CONFIG_JSON }} + if: ${{ env.EG_CONFIG_JSON != null }} + run: echo "$EG_CONFIG_JSON" > $GITHUB_WORKSPACE/data/config.json + + - name: Claim + env: + EG_AUTH_JSON: ${{ secrets.EG_AUTH_JSON }} + run: | + docker run --rm --pull always \ + --volume "$GITHUB_WORKSPACE/data:/app/data" \ + ghcr.io/jackblk/epicgames-freebies-claimer:latest