Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github Actions setup option #27

Closed
maximousblk opened this issue May 15, 2020 · 6 comments
Closed

Github Actions setup option #27

maximousblk opened this issue May 15, 2020 · 6 comments
Labels
wontfix This will not be worked on

Comments

@maximousblk
Copy link

maximousblk commented May 15, 2020

Instead of running this on your own computer, you can use GitHub actions to run it every day automatically. This will help if you don't always have access to your personal computer e.g. if you live in a hostel, where you can't just write your password in a file and assume nobody will see it.

You can create a repository with an action which runs this project. But you can't store plaintext credentials in a public repository. (you can do this with a private repository but you need to write a separate action to first edit the config.js). You can use secrets in github actions which nobody but only you can access.

Using github actions would also mean that you don't have to update it manually. It would clone the latest version and everything will be automatic.

@maximousblk maximousblk changed the title add Command line arguments feature create github action May 15, 2020
@maximousblk
Copy link
Author

I tried this by duplicating this repo to a private repo and it works flawlessly

here is a screen shot (I already have GTA V):

image

#29 can be a problem but I tried it 6 times and it worked everytime.

If I leave the 2FA_SECRET blank, it fails, but if i set to 1234, it works.

Here is the workflow file if you want to try it out:

name: Claim

on:
  schedule:
    - cron:  '0 0 * * *' # Everyday
  push:
    
jobs:
  claim:

    runs-on: windows-latest

    steps:
    - uses: actions/checkout@v2
    - name: Setup Node.js
      uses: actions/setup-node@v1
    - name: Install Dependencies
      run: npm install
    - name: Get them sweet freebies
      run: npm run start

@maximousblk
Copy link
Author

I tried to do this without me cloning the whole repo and uploading it to a private repo by creating only one workflow file. It kept failing for some reason. Turns out, it was a problem with my password. If the password contains &, It bugs out out the commandline. I changed the password to something that doesn't have & in it and it worked.

here is a screen shot (I already have GTA V):

image

Here is the workflow file if you want to try it out:

name: Claim games

on:
  schedule:
    - cron: '0 0 * * *' # Everyday
  push:
    
jobs:
  claim:

    runs-on: windows-latest

    steps:
    - uses: actions/checkout@v2
      with:
        repository: 'Revadike/epicgames-freebies-claimer'
    - name: Setup Node.js
      uses: actions/setup-node@v1
    - name: install dependencies
      run: npm install
    - name: claim
      run: npm run start ${{ secrets.USERNAME }} ${{ secrets.PASSWORD }} 0

Ceate corresponding secrets and let it run.

If this works for everyone, that would be awesome. You won't need the loop option anymore.

@lingsamuel
Copy link
Contributor

lingsamuel commented May 18, 2020

I am using this in Github Actions several weeks.
Here is my sample: https://github.com/lingsamuel/EpicGamesGiveawaysAutoClaimer
Here is instance: https://github.com/lingsamuel/EpicGamesGiveawaysAutoClaimer_Instance

@lingsamuel
Copy link
Contributor

Here is my sample: https://github.com/lingsamuel/EpicGamesGiveawaysAutoClaimer

In my sample, I use my fork repo while the 2FA PR is not merged at that time.

@maximousblk maximousblk reopened this Jun 4, 2020
@maximousblk maximousblk changed the title create github action Github Actions setup option Jun 13, 2020
@maximousblk
Copy link
Author

@Revadike I opened a pull request (#35 ) that solves this issue. I made a supplementary repo which people could just fork and put the login details in secrets and that's it. It has the guide and all necessary information in it.

repo: maximousblk/claim-epic-freebies

@Revadike
Copy link
Owner

Well, I want my repo to be flexible, so it can be setup in whatever way people like it. Github Actions is one way to do it, but perhaps people have their own server, they want to deploy this on. Though, this method could definitely be mentioned in the readme.

@Revadike Revadike added the wontfix This will not be worked on label Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants