8000 Can this run in a container? Getting error · Issue #43 · rossjrw/pr-preview-action · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Can this run in a container? Getting error #43

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

Closed
predominant opened this issue Apr 26, 2023 · 3 comments · Fixed by #45
Closed

Can this run in a container? Getting error #43

predominant opened this issue Apr 26, 2023 · 3 comments · Fixed by #45
Labels
bug Something isn't working question Further information is requested

Comments

@predominant
Copy link

I'm trying to run this action in a container like below:

name: Deploy PR previews

on:
  pull_request:
    types:
      - opened
      - reopened
      - synchronize
      - closed

concurrency: preview-${{ github.ref }}

jobs:
  deploy-preview:
    runs-on: [ self-hosted ]
    container: artifactory.mycompany.com/swr-docker-release/build-image/base:stable
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Setup Node.js
        uses: actions/setup-node@v3
        with:
          node-version: 14.17.0

      - name: Yarn install
        uses: borales/actions-yarn@v4
        with:
          cmd: install
          dir: ./app

      - name: Build production bundle
        uses: borales/actions-yarn@v4
        with:
          cmd: build
          dir: ./app

      - name: Deploy preview
        uses: rossjrw/pr-preview-action@v1
        with:
          source-dir: ./app/dist/

Note that this uses the container option with an artifactory URI to grab the image.

The following error is encountered:

Run /home/myuser/runners/01/_work/_actions/rossjrw/pr-preview-action/v1/lib/find-current-git-tag.sh -p $actionrepo -f $actionref
  /home/myuser/runners/01/_work/_actions/rossjrw/pr-preview-action/v1/lib/find-current-git-tag.sh -p $actionrepo -f $actionref
  shell: bash --noprofile --norc -e -o pipefail {0}
  env:
    action: auto
    targetdir: pr-preview/pr-232
    pr: 232
    pagesurl: swr.github.io/sre-portal
    emptydir: /tmp/tmp.GEsaOyeWhF
    datetime: 2023-04-26 05:10 UTC
    actionref: v1
    actionrepo: rossjrw/pr-preview-action
    deployrepo: swr/sre-portal
    token: ***
/__w/_temp/0dec96f1-b2e1-4f04-a548-60ec5383fe95.sh: line 1: /home/myuser/runners/01/_work/_actions/rossjrw/pr-preview-action/v1/lib/find-current-git-tag.sh: No such file or directory
@rossjrw rossjrw added bug Something isn't working question Further information is requested labels Apr 26, 2023
@rossjrw
Copy link
Owner
rossjrw commented Apr 26, 2023

Looks like this is caused by actions/runner#716

There's a hacky-looking user-end workaround described in that issue: actions/runner#716 (comment), but looks like there's a simpler one on the action end.

@predominant Could you try rossjrw/pr-preview-action@f384107658e4c8979be0fad53dc61657c1d00dae and let me know if that works?

@predominant
Copy link
Author

This works great. Thanks for the fix!

I have other questions but I'll open another issue for that.

@rossjrw
Copy link
Owner
rossjrw commented Apr 27, 2023

Thanks @predominant. Noting that this is now released as of v1.4.1, so you can switch back to rossjrw/pr-preview-action@v1 and get the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
0