Skip to content

Commit

Permalink
User docker command directly
Browse files Browse the repository at this point in the history
  • Loading branch information
erichlf committed May 18, 2024
1 parent 21b2c9e commit 3df8ead
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions .github/workflows/install-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,28 @@ on:
- main
jobs:
install:
container:
image: archlinux:latest
options: --user=root --entrypoint=/bin/bash
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
SSH_AUTH_SOCK: ${{ secrets.SSH_AUTH_SOCK }}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${{ github.workspace }}:/workspace
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup ssh
uses: PhutureCorp/container-ssh-agent@v0.0.1
uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: install
- name: Install
run: |
pacman -Sy --noconfirm sudo openssh git
git config --global --add safe.directory /workspace
cd /workspace
./install.sh"
docker run --rm \
-v $SSH_AUTH_SOCK:/ssh-agent \
-v ~/.ssh/known_hosts:/root/.ssh/known_hosts \
-e SSH_AUTH_SOCK=/ssh-agent \
-v ${{ github.workspace }}:/workspace \
manjarolinux/base:latest \
/bin/bash -c "
pacman -Sy --noconfirm sudo openssh git && \
mkdir -p /root/.ssh && \
chmod 700 /root/.ssh && \
ssh-keyscan github.com >> /root/.ssh/known_hosts && \
git config --global --add safe.directory /workspace && \
cd /workspace && \
./install.sh
"

0 comments on commit 3df8ead

Please sign in to comment.