Skip to content

Commit

Permalink
add dockerhub publish CI action
Browse files Browse the repository at this point in the history
  • Loading branch information
garciagenrique committed Feb 14, 2025
1 parent 5fcd751 commit 9cd4971
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/build-and-publish-tagged.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,48 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip_existing: true

Build-docker:
needs: [Test]
runs-on: ubuntu-latest

permisions:
contents: read
packages: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Log into the Docker Hub
id: login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata for the Docker image
id: metadata
uses: docker/metadata-action@v5
with:
flavor: |
latest=true
tags: |
type=semver,pattern={{raw}}
images: rucio/rucio-jupyterlab

- name: Build and push the Docker image
uses: docker/build-push-action@v6
id: docker_build
with:
context: .
file: ./docker/container/Dockerfile
push: true
tags: ${{ steps.metadata.outputs.tags }}
labels: |
org.opencontainers.image.created=(date +'%Y-%m-%dT%H:%M:%SZ')
org.opencontainers.image.url=https://github.com/rucio/jupyterlab-extension
org.opencontainers.image.title=rucio-jupyterlab
org.opencontainers.image.description=JupyterLab extension for Rucio
org.opencontainers.image.version=${{ steps.metadata.outputs.tags }}

0 comments on commit 9cd4971

Please sign in to comment.