supercharge / mongodb-github-action

Use MongoDB in GitHub Actions
MIT License
224 stars 46 forks source link

Failed to download action #1

Closed moonso closed 4 years ago

moonso commented 4 years ago

Hi, I can not get the action to work. Tried different combinations but always get the following error:

Skärmavbild 2020-03-03 kl  15 01 13

My workflow looks like this:

name: A workflow for my Hello World file
on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest    
    strategy:
      matrix:
        python-version: [3.6]
        mongodb-version: [4.0]

    steps:

    - name: Git checkout
      uses: actions/checkout@v1

    # Set up mongodb
    - name: Start MongoDB
      uses: superchargejs/mongodb-github-action@v1
      with:
        mongodb-version: ${{ matrix.mongodb-version}}

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        python setup.py install

    - name: Test with pytest
      run: |
        py.test -rxs tests/

Thx

marcuspoehls commented 4 years ago

@moonso Hey Måns, sorry for this hiccup!

I guess the @v1 suffix must be @v1.1.0. I tagged releases with major.minor.patch versions. Looks like GitHub isn't resolving @v1 to the latest v1-release.

Can you please update your workflow file to match the latest mongodb-github-action@v1.1.0 version?

    # Set up mongodb
    - name: Start MongoDB
      uses: superchargejs/mongodb-github-action@v1.1.0     # <----------- this is the line
      with:
        mongodb-version: ${{ matrix.mongodb-version}}

Thank you for your help!

moonso commented 4 years ago

Hmm, still does not work. Am I doing something wrong?

1 Current runner version: '2.165.2'
2 Prepare workflow directory
3 Prepare all required actions
4 Download action repository 'actions/checkout@v1'
5 Download action repository 'actions/setup-python@v1'
6 Download action repository 'superchargejs/mongodb-github-action@v1.1.0'
7 ##[warning]Failed to download action 'https://api.github.com/repos/superchargejs/mongodb-github-action/tarball/v1.1.0'. Error Response status code does not indicate success: 404 (Not Found).
8 ##[warning]Back off 25.938 seconds before retry.
9 ##[warning]Failed to download action 'https://api.github.com/repos/superchargejs/mongodb-github-action/tarball/v1.1.0'. Error Response status code does not indicate success: 404 (Not Found).
10 ##[warning]Back off 15.689 seconds before retry.
11 ##[error]Response status code does not indicate success: 404 (Not Found).
moonso commented 4 years ago

This is exactly how the workflow looks like:

name: Build
on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest    
    strategy:
      matrix:
        python-version: [3.6]
        mongodb-version: [4.0]

    steps:

    - name: Git checkout
      uses: actions/checkout@v1

    - name: Set up Python ${{ matrix.python-version}}
      uses: actions/setup-python@v1
      with:
        python-version: ${{ matrix.python-version}}

    # Set up mongodb
    - name: Start MongoDB
      uses: superchargejs/mongodb-github-action@v1.1.0
      with:
        mongodb-version: ${{ matrix.mongodb-version}}

    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        python setup.py install

    - name: Test with pytest
      run: |
        py.test -rxs tests/
marcuspoehls commented 4 years ago

Ah sorry, I think it's the username. I switched it recently from superchargejs (with JS suffix) to supercharge (without ja suffix). Does it fix the issue by changing the name?

moonso commented 4 years ago
Failed to download action 'https://api.github.com/repos/supercharge/mongodb-github-action/tarball/v1.1.0'. Error Response status code does not indicate success: 404 (Not Found).
marcuspoehls commented 4 years ago

@moonso Hey Måns, I was looking through the GitHub Action Workflow for the Supercharge framework. The difference I can see is the v in @v1.1.0 between your config and the one from the framework.

Looks like the config must be like this:

    # Set up mongodb
    - name: Start MongoDB
      uses: supercharge/mongodb-github-action@1.1.0   # <----------- this line
      with:
        mongodb-version: ${{ matrix.mongodb-version}}

Here's the workflow file for the Supercharge framework: https://github.com/supercharge/framework/blob/master/.github/workflows/run-tests.yml

moonso commented 4 years ago

Yay that made it work 🍾 !

marcuspoehls commented 4 years ago

Yeah 🎉 Thank you for your support and patience along the way! 🙏