Skip to content

Moves lanovky too. #10

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions .github/workflows/build-preview-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,16 @@ jobs:
runs-on: ubuntu-latest
env:
ACTING_SHA: ${{ github.sha }}
POSITION_FROM_TOP: 1
POSITION_FROM_TOP: '0'
OUTPUT_NAME: 'machinekit-site-${{ github.sha }}'
ACTING_REPOSITORY: ${{ github.repository }}
steps:
# Hack uptil conditional setting of environment variable is posible
# (or this is reworked into an action)
- name: Test for pull request or push
if: github.event_name == 'push'
run: echo ::set-env name=POSITION_FROM_TOP::1

# Locally clone the repository which we want to build with depth of 5 commits
- name: Checkout the pull request for Machinekit-docs
uses: actions/checkout@v2
Expand All @@ -33,7 +39,13 @@ jobs:
run: echo ${{ env.ACTING_SHA }}

- name: Git log of repository on which the build is requested
run: git log
run: |
git log
echo "WHERE is HEAD"
git log HEAD
echo ""
echo "HEAD~1"
git log HEAD~1
working-directory: ./to_build

# Create directory for output files and export it's name as a environment variable
Expand All @@ -49,12 +61,13 @@ jobs:
- name: Create JSON with commit metadata
env:
FILENAME: '$OUTPUT_DIRECTORY/build-metadata.json'
shell: bash
run: |
echo "###########################################################"
echo "# Commit which will be used for mining of the credentials #"
echo "###########################################################"
git log -n 1 ${{ env.ACTING_SHA }}~$((${{ env.POSITION_FROM_TOP }}-1))
jq -n --arg authoremail "$(git log --format='%ae' -n 1 ${{ env.ACTING_SHA }}~$((${{ env.POSITION_FROM_TOP }}-1)))" --arg authorname "$(git log --format='%an' -n 1 ${{ env.ACTING_SHA }}~$((${{ env.POSITION_FROM_TOP }}-1)))" --arg commitmsg "$(git log --format='%B' -n 1 ${{ env.ACTING_SHA }}~$((${{ env.POSITION_FROM_TOP }}-1)))" --arg sha "${{ env.ACTING_SHA }}" '{"author":"\($authorname)","email":"\($authoremail)","message":"\($commitmsg)","sha":"\($sha)"}' > ${{ env.FILENAME }}
git log -n 1 $(echo HEAD~${{ env.POSITION_FROM_TOP }})
jq -n --arg authoremail "$(git log --format='%ae' -n 1 $(echo HEAD~${{ env.POSITION_FROM_TOP }}))" --arg authorname "$(git log --format='%an' -n 1 $(echo HEAD~${{ env.POSITION_FROM_TOP }}))" --arg commitmsg "$(git log --format='%B' -n 1 $(echo HEAD~${{ env.POSITION_FROM_TOP }}))" --arg sha "${{ env.ACTING_SHA }}" '{"author":"\($authorname)","email":"\($authoremail)","message":"\($commitmsg)","sha":"\($sha)"}' > ${{ env.FILENAME }}
echo "###########################################################"
echo "# JSON file with metadata information of pertinent commit #"
echo "###########################################################"
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h2>Moves.</h2>
</div>
<div class="unit one-third">
<div class="feature">
<h2>Controls.</h2>
<h2>Controls. Lanovky</h2>
<p>
Remote control your Machinekit project through C or
Python APIs. Whether an Android GUI, a command line
Expand Down