Skip to content

Commit

Permalink
Merge pull request #416 from afuetterer/style
Browse files Browse the repository at this point in the history
style: apply pre-commit hooks
  • Loading branch information
huberrob authored Sep 28, 2023
2 parents 023c64c + 869b82a commit 2db47f8
Show file tree
Hide file tree
Showing 155 changed files with 134,502 additions and 36,512 deletions.
48 changes: 24 additions & 24 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ on:
push:
# Publish `master` as Docker `latest` image.
branches:
- master
- master
# Publish `v1.2.3` tags as releases?
# tags:
# - v*
release:
types:
- created
- created

env:
DOCKER_BUILDKIT: 1
Expand All @@ -25,35 +25,35 @@ jobs:

steps:

- run: docker --version
- run: docker buildx version
- run: docker --version
- run: docker buildx version

- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Build image
run: docker build . --file Dockerfile --tag $IMAGE_NAME
- name: Build image
run: docker build . --file Dockerfile --tag $IMAGE_NAME

- name: Log into GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin
- name: Log into GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login https://ghcr.io -u ${{ github.actor }} --password-stdin

- name: Push image to GitHub Container Registry
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
- name: Push image to GitHub Container Registry
run: |
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Change all uppercase to lowercase
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
16 changes: 8 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
version: "3.3"
version: '3.3'
services:
fujirest:
image: "ghcr.io/pangaea-data-publisher/fuji:latest"
image: ghcr.io/pangaea-data-publisher/fuji:latest
ports:
- "1071:1071"
- 1071:1071
environment:
- ENABLE_CORS=true
- ENABLE_CORS=true

notebook:
image: "jupyter/minimal-notebook:latest"
image: jupyter/minimal-notebook:latest
environment:
- JUPYTER_ENABLE_LAB=yes
- JUPYTER_ENABLE_LAB=yes
volumes:
- .:/home/jovyan/work
- .:/home/jovyan/work
ports:
- "8888:8888"
- 8888:8888
Loading

0 comments on commit 2db47f8

Please sign in to comment.