Skip to content

Conditional repr assets #69

Conditional repr assets

Conditional repr assets #69

Workflow file for this run

name: Image Builder
on:
push:
# Build and publish after updating the default branch
branches:
- main
paths-ignore:
- '.dockerignore'
- 'docs/*'
- 'LICENSE'
- 'README.md'
- 'example/*'
pull_request:
# Build, but don't push on pull requests
jobs:
# Build images and push them
build:
name: Build Docker image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build image
run: |
docker build \
--tag=${{ github.repository }} \
--tag=ghcr.io/${{ github.repository }} \
.
- name: Push to Docker Hub
if: >-
github.event_name == 'push' &&
github.repository == 'neurolibre/inara'
run: |
# Log into registry
echo "${{ secrets.DOCKER_HUB_TOKEN }}" |
docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin
docker push ${{ github.repository }}
- name: Push to GitHub Container Registry
if: >-
github.event_name == 'push' &&
github.repository == 'neurolibre/inara'
run: |
# Log into registry
echo "${{ secrets.GITHUB_TOKEN }}" | \
docker login ghcr.io \
-u ${{ github.actor }} \
--password-stdin
docker push ghcr.io/${{ github.repository }}