Skip to content

Deployment of multi-version python images onto github packages #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
43 changes: 28 additions & 15 deletions .github/workflows/build-base-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
branches:
- main
pull_request:
- testing
workflow_dispatch:

jobs:
Expand All @@ -24,37 +24,27 @@ jobs:
with:
fetch-depth: 0

# - name: Log in to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}

- name: Login to Github Packages
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract Docker Metadata
id: meta
uses: docker/metadata-action@v5
with:
flavor: |
suffix=-${{ matrix.python-version }}
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
type=raw,value=${{ matrix.python-version }},suffix=,enable={{is_default_branch}}
type=raw,value=latest,suffix=,enable=${{ github.ref_name == github.event.repository.default_branch && matrix.python-version == '3.8' }}
type=edge,branch=main
type=raw,value=${{ github.ref_name }}
type=raw,value=latest,suffix=,enable=${{ github.ref_name == github.event.repository.default_branch }}
images: |
name=${{ secrets.DOCKER_USERNAME }}/python-base-eval-layer,enable=false
name=ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}

- name: Build and Push Base Image
uses: docker/build-push-action@v5
with:
Expand All @@ -66,3 +56,26 @@ jobs:
INVOKER_ID=${{ secrets.INVOKER_ID }}
INVOKER_KEY=${{ secrets.INVOKER_KEY }}
INVOKER_REGION=${{ secrets.INVOKER_REGION }}

# name: Build and Push to DockerHub Registry
# runs-on: ubuntu-latest

# steps:
# - name: Checkout
# uses: actions/checkout@v2

# - name: Log in to Docker Hub
# uses: docker/login-action@v1
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}

# - name: Build and Push Base Image
# uses: docker/build-push-action@v2
# with:
# push: true
# tags: ${{ secrets.DOCKER_USERNAME }}/python-base-eval-layer
# build-args: |
# INVOKER_ID=${{ secrets.INVOKER_ID }}
# INVOKER_KEY=${{ secrets.INVOKER_KEY }}
# INVOKER_REGION=${{ secrets.INVOKER_REGION }}