Skip to content

Commit

Permalink
Update builder.
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-matera committed Aug 2, 2023
1 parent aa2d798 commit f014b45
Showing 1 changed file with 29 additions and 23 deletions.
52 changes: 29 additions & 23 deletions .github/workflows/repo2docker-action.yaml
@@ -1,34 +1,40 @@
name: Build and Push Image
on:
name: Create and publish a Docker image

on:
push:
branches:
- "release-*"
branches:
- 'main'
tags:
- 'release-*'

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
binder:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: update jupyter dependencies with repo2docker
uses: jupyterhub/repo2docker-action@master
with:
DOCKER_USERNAME: ${{ github.actor }}
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
DOCKER_REGISTRY: ${{ env.REGISTRY }}
PUBLIC_REGISTRY_CHECK: true
BINDER_CACHE: true
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit f014b45

Please sign in to comment.