Skip to content
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

Ci #9

Merged
merged 2 commits into from
Jan 30, 2024
Merged

Ci #9

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
56 changes: 5 additions & 51 deletions .github/workflows/delete-docker-on-pr-close.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker
name: Docker delete tags

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
Expand Down Expand Up @@ -53,80 +53,34 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata (JAX conda CPU)
id: meta_jax_conda
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.JAX_CONDA_IMAGE_NAME }}
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr

- name: Extract Docker metadata (JAX conda GPU)
id: meta_jax_conda_cuda
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.JAX_CONDA_IMAGE_NAME }}
tags: |
type=schedule,suffix=-cuda
type=ref,event=branch,suffix=-cuda
type=ref,event=tag,suffix=-cuda
type=ref,event=pr,suffix=-cuda

- name: Extract Docker metadata (CPU)
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr

- name: Extract Docker metadata (GPU)
id: meta_cuda
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=schedule,suffix=-cuda
type=ref,event=branch,suffix=-cuda
type=ref,event=tag,suffix=-cuda
type=ref,event=pr,suffix=-cuda

- name: Delete image (JAX conda CPU)
uses: bots-house/[email protected]
with:
owner: yfukai
name: ${{ env.JAX_CONDA_IMAGE_NAME }}
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.meta_jax_conda.outputs.tags }}
tag: pr-${{github.event.pull_request.number }}

- name: Delete image (JAX conda GPU)
uses: bots-house/[email protected]
with:
owner: yfukai
name: ${{ env.JAX_CONDA_IMAGE_NAME }}
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.meta_jax_conda_cuda.outputs.tags }}
tag: pr-${{github.event.pull_request.number }}-cuda

- name: Delete image (JAX conda CPU)
uses: bots-house/[email protected]
with:
owner: yfukai
name: ${{ env.IMAGE_NAME }}
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.meta.outputs.tags }}
tag: pr-${{github.event.pull_request.number }}

- name: Delete image (JAX conda GPU)
uses: bots-house/[email protected]
with:
owner: yfukai
name: ${{ env.IMAGE_NAME }}
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.meta_cuda.outputs.tags }}
tag: pr-${{github.event.pull_request.number }}-cuda
16 changes: 9 additions & 7 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Docker
name: Docker Publish

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
Expand Down Expand Up @@ -70,10 +70,11 @@ jobs:
- name: Extract first tag (JAX conda CPU)
id: extract_first_tag_cpu
run: |
# Extracting the first component
first_component=$(echo "${{ steps.meta_jax_conda.outputs.tags }}" | cut -d ',' -f 1)
# Extracting the first tag
tags="${{ steps.meta_jax_conda.outputs.tags }}"
first_line=$(echo "$tags" | head -n 1)
# Setting the output
echo "meta_jax_conda_first_tag=$first_component" >> $GITHUB_OUTPUT
echo "meta_jax_conda_first_tag=$first_line" >> $GITHUB_OUTPUT

- name: Extract Docker metadata (JAX conda GPU)
id: meta_jax_conda_cuda
Expand All @@ -89,10 +90,11 @@ jobs:
- name: Extract first tag (JAX conda GPU)
id: extract_first_tag_gpu
run: |
# Extracting the first component
first_component=$(echo "${{ steps.meta_jax_conda_cuda.outputs.tags }}" | cut -d ',' -f 1)
# Extracting the first tag
tags="${{ steps.meta_jax_conda_cuda.outputs.tags }}"
first_line=$(echo "$tags" | head -n 1)
# Setting the output
echo "meta_jax_conda_cuda_first_tag=$first_component" >> $GITHUB_OUTPUT
echo "meta_jax_conda_cuda_first_tag=$first_line" >> $GITHUB_OUTPUT

- name: Extract Docker metadata (CPU)
id: meta
Expand Down
Loading