I’m trying to setup CI/CD using gitea actions. My project has a Dockerfile
containing the dev environment I use to build the application.
I’m trying to create an action which builds the dev container, then builds my project within it, and subsequently runs unit tests and whatnot. My workflow looks like the following:
jobs:
Foo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build image
run: docker build -t project-env -f docker/Dockerfile .
- name: Build application
run: docker run --rm -v .:/workspace project-env './build.sh'
where workspace
is the workdir specified in the Dockerfile
. However, the CWD volume doesn’t appear to be mounted into the container, so the script which runs the build can’t be resolved. I’m just wondering whether I’m doing something silly here?