Skip to content

Commit

Permalink
feat(actions): build action use variables
Browse files Browse the repository at this point in the history
  • Loading branch information
roeybenarieh committed Dec 9, 2023
1 parent ba66d43 commit 50baafd
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/build_nvim_artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@ on:
jobs:
artifact-neovim-generated-folders:
runs-on: ubuntu-latest
env:
HOME_PATH: /home/runner
CONF_PATH: $HOME_PATH/.config/nvim
LOCAL_DATA_PATH: $HOME_PATH/.local/share/nvim
BUILD_FILE_NAME: build.tar.gz

steps:
# this checkout moves repo to the $GITHUB_WORKSPACE directory
- name: checkout repo code to container
uses: actions/checkout@v4

- name: move nvim configuration from repo
run: cd /home/runner/; mkdir -p .config/nvim; mv $GITHUB_WORKSPACE/* .config/nvim
run: mkdir -p $CONF_PATH; mv $GITHUB_WORKSPACE/* $CONF_PATH


- name: install neovim
Expand All @@ -28,12 +34,12 @@ jobs:
run: nvim --headless -c "Lazy install" -c "qall"

- name: compress nvim generated folders
run: tar -czf build.tar.gz -C /home/runner/ .config/nvim/ .local/share/nvim
run: tar -czf $BUILD_FILE_NAME -C $HOME_PATH $CONF_PATH $LOCAL_DATA_PATH

- name: artifact nvim generated folders
uses: actions/upload-artifact@v3
with:
name: generated nvim folders
path: build.tar.gz
path: $BUILD_FILE_NAME
retention-days: 90

0 comments on commit 50baafd

Please sign in to comment.