From e067e7f3fc94fd23c36be9280128489a2fce315b Mon Sep 17 00:00:00 2001 From: Nell Hardcastle Date: Thu, 26 Sep 2024 13:19:30 -0700 Subject: [PATCH] ci: Add docker builds to github actions --- .github/workflows/docker.yml | 81 ++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 .github/workflows/docker.yml diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 000000000..32d40a164 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,81 @@ +name: Build Docker Image +on: + push: +jobs: + build_server: + name: build and publish server to docker hub + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: login to docker hub + id: docker-hub + env: + username: ${{secrets.DOCKERHUB_USERNAME}} + password: ${{secrets.DOCKERHUB_PASSWORD}} + run: | + docker login -u $username -p $password + - name: build the docker image + id: build-docker-image + run: | + docker build -t openneuro/server:latest packages/openneuro-server +# - name: push the docker image +# id: push-docker-image +# run: docker push openneuro/server:latest + build_app: + name: build and publish app to docker hub + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: login to docker hub + id: docker-hub + env: + username: ${{secrets.DOCKERHUB_USERNAME}} + password: ${{secrets.DOCKERHUB_PASSWORD}} + run: | + docker login -u $username -p $password + - name: build the docker image + id: build-docker-image + run: | + docker build -t openneuro/app:latest packages/openneuro-app +# - name: push the docker image +# id: push-docker-image +# run: docker push openneuro/app:latest + build_indexer: + name: build and publish app to docker hub + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: login to docker hub + id: docker-hub + env: + username: ${{secrets.DOCKERHUB_USERNAME}} + password: ${{secrets.DOCKERHUB_PASSWORD}} + run: | + docker login -u $username -p $password + - name: build the docker image + id: build-docker-image + run: | + docker build -t openneuro/indexer:latest packages/openneuro-indexer +# - name: push the docker image +# id: push-docker-image +# run: docker push openneuro/indexer:latest + build_datalad_service: + name: build and publish app to docker hub + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: login to docker hub + id: docker-hub + env: + username: ${{secrets.DOCKERHUB_USERNAME}} + password: ${{secrets.DOCKERHUB_PASSWORD}} + run: | + docker login -u $username -p $password + - name: build the docker image + id: build-docker-image + run: | + cd services/datalad + docker build --build-arg LERNA_JSON="$(cat ../../lerna.json)" -t openneuro/datalad-service:latest . +# - name: push the docker image +# id: push-docker-image +# run: docker push openneuro/indexer:latest \ No newline at end of file