env-changed #9
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: Run Code | |
on: [push, repository_dispatch, workflow_dispatch] | |
jobs: | |
run-incomplete: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Run Incomplete | |
run: > | |
docker run --network host | |
-v /var/run/docker.sock:/var/run/docker.sock | |
-v $(pwd):$(pwd) | |
-w $(pwd) | |
ghcr.io/zcaudate-xyz/infra-foundation-clean:main lein incomplete | |
run-tests: | |
runs-on: ubuntu-latest | |
timeout-minutes: 40 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Run Tests | |
run: > | |
docker run --network host | |
-v /var/run/docker.sock:/var/run/docker.sock | |
-v $(pwd):$(pwd) | |
-w $(pwd) | |
ghcr.io/zcaudate-xyz/infra-foundation-clean:main lein test | |
services: | |
postgres: | |
image: postgres:13 | |
env: | |
POSTGRES_DB: test | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_PORT: 5432 | |
POSTGRES_USER: postgres | |
ports: | |
- 5432:5432 | |
build-js-web: | |
runs-on: ubuntu-latest | |
timeout-minutes: 3 | |
steps: | |
- name: Write SSH keys | |
shell: bash | |
run: | | |
install -m 600 -D /dev/null ~/.ssh/id_rsa | |
echo "${{ secrets.GH_SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa | |
ssh-keyscan -H github.com > ~/.ssh/known_hosts | |
- name: Checkout base repository | |
uses: actions/checkout@v3 | |
with: | |
repository: zcaudate/foundation-base | |
path: foundation-base | |
token: ${{ secrets.GH_TOKEN }} | |
- name: Deploying native-code | |
run: > | |
docker run --network host | |
-v /var/run/docker.sock:/var/run/docker.sock | |
-v $HOME/.ssh:/root/.ssh | |
-v $(pwd):$(pwd) -w $(pwd) | |
-e "GITHUB_TOKEN=${{ secrets.GH_TOKEN }}" | |
-e "GITHUB_USER=${{ secrets.GH_USER }}" | |
ghcr.io/zcaudate-xyz/infra-foundation-clean:main | |
bash -c "cd foundation-base && git config --global --add safe.directory '*' && lein push-native-code" |