Skip to content

Merge pull request #55 from datajoint/fix-ci-docker-compose #75

Merge pull request #55 from datajoint/fix-ci-docker-compose

Merge pull request #55 from datajoint/fix-ci-docker-compose #75

Workflow file for this run

name: Docker Image CI
on:
push:
tags:
- 'v*.*.*'
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build Nginx Image
run: TAG=test docker buildx bake --set "*.platform=linux/amd64" --load
- name: Login to Docker Hub
if: |
github.event_name == 'push' &&
startsWith(github.ref, 'refs/tags') &&
(
github.repository_owner == 'datajoint' ||
github.repository_owner == 'datajoint-company' ||
github.repository_owner == 'dj-sciops'
)
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Push Nginx Image
if: |
github.event_name == 'push' &&
startsWith(github.ref, 'refs/tags') &&
(
github.repository_owner == 'datajoint' ||
github.repository_owner == 'datajoint-company' ||
github.repository_owner == 'dj-sciops'
)
run: |
TAG=${{github.ref_name}} docker buildx bake --set "*.platform=linux/amd64" --load
TAG=${{github.ref_name}} docker compose push
TAG=latest docker buildx bake --set "*.platform=linux/amd64" --load
TAG=latest docker compose push
#uses: docker/build-push-action@v2
#with:
#context: frontend
#file: Dockerfile
#push: true
#tags: ${{ secrets.DOCKER_HUB_USERNAME }}/nginx:latest