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

INPUT_EMPTYCOMMITS is not defined with a docker image from Docker Hub #29

Closed
peaceiris opened this issue Sep 21, 2019 · 3 comments · Fixed by #28
Closed

INPUT_EMPTYCOMMITS is not defined with a docker image from Docker Hub #29

peaceiris opened this issue Sep 21, 2019 · 3 comments · Fixed by #28
Assignees
Labels
bug Something isn't working resolved

Comments

@peaceiris
Copy link
Owner

I will fix this by #28

And I found it that inputs were not defined when we use a docker image from Docker Hub without with statement even though we defined emptyCommits default true

I will ask about this behavior at the GitHub Community forum.

INPUT_EMPTYCOMMITS were not defined

    - name: Deploy
      uses: docker://peaceiris/gh-pages:v2.3.1
      env:
        PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
        PUBLISH_BRANCH: gh-pages
        PUBLISH_DIR: ./public
-e PERSONAL_TOKEN -e PUBLISH_BRANCH -e PUBLISH_DIR -e HOME

INPUT_EMPTYCOMMITS were defined

    - name: Deploy
      uses: docker://peaceiris/gh-pages:v2.3.1
      env:
        PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
        PUBLISH_BRANCH: gh-pages
        PUBLISH_DIR: ./public
      with:
        emptyCommits: true
        # emptyCommits: false
-e PERSONAL_TOKEN -e PUBLISH_BRANCH -e PUBLISH_DIR -e INPUT_EMPTYCOMMITS -e HOME

Originally posted by @peaceiris in #27 (comment)

@peaceiris peaceiris added the bug Something isn't working label Sep 21, 2019
@peaceiris
Copy link
Owner Author

#27 (comment)

I notice the info statement reporting the value of that variable is blank, which is odd given the parameter should default to "true" if nothing is provided (docs page).

With that being said, there are changes reported by the commit step, so the flag shouldn't prevent the deployment, regardless of what the flag is set to. I'm wondering if there's an order of operations issue with that block which is causing it to exit before the push command is made. In other words, I'm wondering if this would help as well:

git commit -m "${COMMIT_MESSAGE}" || \
-        print_info "No changes detected, skipping deployment" && \
-        exit 0
+        (print_info "No changes detected, skipping deployment" && \
+        exit 0)

Otherwise the direction you are going with the PR should also fix the flag being incorrectly interpreted.

peaceiris added a commit that referenced this issue Sep 23, 2019
* fix: Fixes for docker hub image (INPUT_EMPTYCOMMITS false condition)
* fix: Add skip function

Close #27
Close #31 
Keep open #29 

* gha: Add fetch-depth 1 to actions/checkout
* gha: Add pull_request trigger, Close #32
@peaceiris peaceiris reopened this Sep 23, 2019
peaceiris added a commit that referenced this issue Sep 24, 2019
peaceiris added a commit that referenced this issue Sep 24, 2019
peaceiris added a commit that referenced this issue Sep 24, 2019
* fix: avoid #29
* docs: update TOC
* docs: update tag to v2.4.0
@peaceiris peaceiris self-assigned this Oct 7, 2019
@peaceiris peaceiris changed the title INPUT_EMPTYCOMMITS is not defined with a docker image from Dcoker Hub INPUT_EMPTYCOMMITS is not defined with a docker image from Docker Hub Dec 4, 2019
@peaceiris
Copy link
Owner Author

This will be deprecated by #54

@github-actions
Copy link
Contributor

This issue has been LOCKED because of it being resolved!

The issue has been fixed and is therefore considered resolved.
If you still encounter this or it has changed, open a new issue instead of responding to solved ones.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant