Skip to content

Commit

Permalink
Removing GHCR job (#10)
Browse files Browse the repository at this point in the history
* Removing GHCR job

* Entire job
  • Loading branch information
MattBialas authored Aug 1, 2023
1 parent 7119f31 commit c40d19b
Showing 1 changed file with 80 additions and 79 deletions.
159 changes: 80 additions & 79 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -167,90 +167,91 @@ jobs:
asset_name: lambda-python3.10.zip
asset_content_type: application/zip

publish-docker:
needs: [tests]
if: github.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
# publish-docker:
# needs: [tests]
# if: github.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v1

#- name: Login to DockerHub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1

- name: Login to Github
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# - name: Login to DockerHub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set tag version
id: tag
# https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions
run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
# Uvicorn
# Push `latest` when commiting to main
- name: Build and push uvicorn
if: github.ref == 'refs/heads/main'
uses: docker/build-push-action@v2
with:
# See https://github.com/developmentseed/titiler/discussions/387
platforms: linux/amd64
context: .
file: dockerfiles/Dockerfile.uvicorn
push: true
tags: |
ghcr.io/${{ github.repository }}-uvicorn:latest
# Push `{VERSION}` when pushing a new tag
- name: Build and push uvicorn
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
uses: docker/build-push-action@v2
with:
# See https://github.com/developmentseed/titiler/discussions/387
platforms: linux/amd64
context: .
file: dockerfiles/Dockerfile.uvicorn
push: true
tags: |
ghcr.io/${{ github.repository }}-uvicorn:${{ steps.tag.outputs.tag }}
# Gunicorn
# Push `latest` when commiting to main
- name: Build and push
if: github.ref == 'refs/heads/main'
uses: docker/build-push-action@v2
with:
# See https://github.com/developmentseed/titiler/discussions/387
platforms: linux/amd64
context: .
file: dockerfiles/Dockerfile.gunicorn
push: true
tags: |
ghcr.io/${{ github.repository }}:latest
# Push `{VERSION}` when pushing a new tag
- name: Build and push
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
uses: docker/build-push-action@v2
with:
# See https://github.com/developmentseed/titiler/discussions/387
platforms: linux/amd64
context: .
file: dockerfiles/Dockerfile.gunicorn
push: true
tags: |
ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.tag }}
# - name: Login to Github
# uses: docker/login-action@v1
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}

# - name: Set tag version
# id: tag
# # https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions
# run: echo ::set-output name=tag::${GITHUB_REF#refs/*/}
# # Uvicorn
# # Push `latest` when commiting to main
# - name: Build and push uvicorn
# if: github.ref == 'refs/heads/main'
# uses: docker/build-push-action@v2
# with:
# # See https://github.com/developmentseed/titiler/discussions/387
# platforms: linux/amd64
# context: .
# file: dockerfiles/Dockerfile.uvicorn
# push: true
# tags: |
# ghcr.io/${{ github.repository }}-uvicorn:latest

# # Push `{VERSION}` when pushing a new tag
# - name: Build and push uvicorn
# if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
# uses: docker/build-push-action@v2
# with:
# # See https://github.com/developmentseed/titiler/discussions/387
# platforms: linux/amd64
# context: .
# file: dockerfiles/Dockerfile.uvicorn
# push: true
# tags: |
# ghcr.io/${{ github.repository }}-uvicorn:${{ steps.tag.outputs.tag }}

# # Gunicorn
# # Push `latest` when commiting to main
# - name: Build and push
# if: github.ref == 'refs/heads/main'
# uses: docker/build-push-action@v2
# with:
# # See https://github.com/developmentseed/titiler/discussions/387
# platforms: linux/amd64
# context: .
# file: dockerfiles/Dockerfile.gunicorn
# push: true
# tags: |
# ghcr.io/${{ github.repository }}:latest

# # Push `{VERSION}` when pushing a new tag
# - name: Build and push
# if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
# uses: docker/build-push-action@v2
# with:
# # See https://github.com/developmentseed/titiler/discussions/387
# platforms: linux/amd64
# context: .
# file: dockerfiles/Dockerfile.gunicorn
# push: true
# tags: |
# ghcr.io/${{ github.repository }}:${{ steps.tag.outputs.tag }}

# deploy:
# needs: [tests, publish]
Expand Down

0 comments on commit c40d19b

Please sign in to comment.