Skip to content

Instantly share code, notes, and snippets.

View orphefs's full-sized avatar

Orfeas Kypris orphefs

  • Oxford, UK
View GitHub Profile
AZURE_CREDENTIALS: { "clientId": "redacted", "clientSecret": "redacted", "subscriptionId": "redacted", "tenantId": "redacted", "activeDirectoryEndpointUrl": "https://login.microsoftonline.com", "resourceManagerEndpointUrl": "https://management.azure.com/", "activeDirectoryGraphResourceId": "https://graph.windows.net/", "sqlManagementEndpointUrl": "https://management.core.windows.net:8443/", "galleryEndpointUrl": "https://gallery.azure.com/", "managementEndpointUrl": "https://management.core.windows.net/" }
├── .actrc
├── ci-logs
│   ├── dry-run.log
│   └── run.log
├── Dockerfile
├── my-repo
   ├── .git
   ├── .github
   │   └── workflows
   │   └── tests.yml
tail -f ci-logs/run.log
sudo docker run \
-d --rm \ # delete container when finished
-v /var/run/docker.sock:/var/run/docker.sock \
-v $(pwd)/my-repo:/project \ # mount repo as volume inside container
-v $(pwd)/ci-logs:/logs \ # logs directory
-e ACTION=pull_request \ # our action (could be push, or something else)
github-actions-pipeline # our image
docker build -t github-actions-pipeline .
on: ${ACTION}
$ tree -a
.
├── .actrc
├── Dockerfile
├── my-repo
   ├── .git
   ├── .github
   │   └── workflows
   │   └── tests.yml
   └── src
FROM docker:dind
RUN apk add curl
RUN curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sh
COPY .actrc /
RUN mv /.actrc ~/.actrc
WORKDIR /project
$ tree -a
.
├── my-repo
   ├── .git
   ├── .github
   │   └── workflows
   │   └── tests.yml
   └── src
.actrc
$ tree -a
.
├── my-repo
   ├── .git
   ├── .github
   │   └── workflows
   │   └── tests.yml
   └── src