bin/clipboard: Fix #340
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
name: Install ${{ matrix.params.env }} | |
# This job runs on Linux | |
runs-on: ubuntu-latest | |
container: ubuntu:18.04 | |
strategy: | |
matrix: | |
params: | |
- env: default | |
user: n1amr | |
- env: dell | |
user: n1amr | |
- env: azure | |
user: n1amr | |
- env: toshiba | |
user: n1amr | |
- env: pi | |
user: pi | |
- env: ms | |
user: amralaa | |
steps: | |
- uses: actions/checkout@v1 | |
with: | |
submodules: true | |
token: ${{ secrets.REPO_ACCESS_TOKEN }} | |
- name: '[Pre] Clone custom config repository' | |
shell: bash | |
run: | | |
set -xv | |
rm -rfv ./dotfiles/custom | |
- name: 'Clone custom config repository' | |
uses: actions/checkout@v1 | |
with: | |
repository: n1amr/dotfiles.custom | |
ref: refs/heads/master | |
submodules: true | |
token: ${{ secrets.REPO_ACCESS_TOKEN }} | |
path: ./dotfiles/custom | |
- name: Install dependencies | |
shell: bash | |
run: | | |
set -xv | |
apt-get update | |
apt-get install -y git curl zsh bash | |
- name: Add user | |
shell: bash | |
run: | | |
set -xv | |
mkdir -pv /home | |
useradd -s /bin/zsh -d "/home/${{ matrix.params.user }}" -m -G sudo "${{ matrix.params.user }}" | |
- name: Install dotfiles | |
env: | |
USER: ${{ matrix.params.user }} | |
HOME: /home/${{ matrix.params.user }} | |
DOTFILES_CUSTOM_REPO_URL: 'https://github.com/n1amr/dotfiles.custom' | |
run: | | |
set -xv | |
sh -xvue ./install -f -e "${{ matrix.params.env }}" | |
- name: Reinstall dotfiles | |
env: | |
USER: ${{ matrix.params.user }} | |
HOME: /home/${{ matrix.params.user }} | |
run: | | |
set -xv | |
sh -xvue ./install -f | |
- name: Run on zsh | |
env: | |
USER: ${{ matrix.params.user }} | |
HOME: /home/${{ matrix.params.user }} | |
run: | | |
set -xv | |
zsh -xv -c 'source ~/.zshrc' | |
- name: Run on bash | |
env: | |
USER: ${{ matrix.params.user }} | |
HOME: /home/${{ matrix.params.user }} | |
run: | | |
set -xv | |
bash -xv -c 'source ~/.bashrc' | |
# - name: Set git credentials | |
# shell: bash | |
# env: | |
# GIT_ASKPASS: /askpass | |
# GIT_PASSWORD: ${{ secrets.REPO_ACCESS_TOKEN }} | |
# run: | | |
# echo -e "#!/bin/sh\n | |
# exec echo \"$GIT_PASSWORD\"" > "$GIT_ASKPASS" | |
# cat "$GIT_ASKPASS" | |
# chmod +x "$GIT_ASKPASS" | |
# # git config credential.helper '!f() { sleep 1; echo "username=${GITHUB_REPOSITORY_OWNER}"; echo "password=${GIT_PASSWORD}"; }; f' | |
# - name: Update dotfiles | |
# env: | |
# USER: ${{ matrix.params.user }} | |
# HOME: /home/${{ matrix.params.user }} | |
# run: | | |
# zsh -i -c 'dotfiles update' |