From d1d37c2565e57fb95d93d72552a7ee8dd2480b78 Mon Sep 17 00:00:00 2001 From: Graeme Watt Date: Tue, 14 Nov 2023 11:19:26 +0000 Subject: [PATCH] global: unpin dependencies and other updates * Unpin "hepdata-converter" Docker image to use latest image available. * Unpin "hepdata-converter-ws" PyPI package to use latest available. * Refinements to README.md file such as removing mentions of Travis CI. * Rename 'master' branch to 'main'. * Upgrade actions/checkout to latest v4. --- .github/workflows/ci.yml | 6 +++--- Dockerfile | 6 +++--- README.md | 27 ++++++++++++++------------- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e34702..6848b66 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: Continuous Integration on: push: pull_request: - branches: [ master ] + branches: [ main ] release: types: [ published ] @@ -14,11 +14,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Build the Docker image run: docker build . --file Dockerfile --tag hepdata-converter-ws - name: Deploy - if: contains(github.ref, 'master') || github.event_name == 'release' + if: contains(github.ref, 'main') || github.event_name == 'release' env: CI_TAG: ${{ github.event.release.tag_name }} IMAGE_NAME: hepdata-converter-ws diff --git a/Dockerfile b/Dockerfile index f060c8c..85baae3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ -FROM hepdata/hepdata-converter:0.2.0 +FROM hepdata/hepdata-converter:latest -RUN pip3 install --upgrade pip -RUN pip3 install -I hepdata-converter-ws==0.2.0 +RUN pip install --upgrade pip +RUN pip install hepdata-converter-ws CMD hepdata-converter-ws diff --git a/README.md b/README.md index 990c047..30b24cf 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,31 @@ - -[![GitHub Actions Status](https://github.com/HEPData/hepdata-converter-ws-docker/workflows/Continuous%20Integration/badge.svg?branch=master)](https://github.com/HEPData/hepdata-converter-ws-docker/actions?query=branch%3Amaster) +[![GitHub Actions Status](https://github.com/HEPData/hepdata-converter-ws-docker/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/HEPData/hepdata-converter-ws-docker/actions?query=branch%3Amain) +[![Docker Pulls](https://img.shields.io/docker/pulls/hepdata/hepdata-converter)](https://hub.docker.com/r/hepdata/hepdata-converter) # hepdata-converter-ws-docker *Build system for creating Docker image used to run hepdata-converter-ws* -This is a *companion repository* for the https://github.com/HEPData/hepdata-converter-ws repository. +This is a *companion repository* for the [hepdata-converter-ws](https://github.com/HEPData/hepdata-converter-ws) repository. -This repository automates building Docker images with the help of Travis and then -pushing them to DockerHub. The docker image installs hepdata-converter-ws from pypi -and then runs the webservice (on its default port, 5000). +This repository automates building Docker images with the help of GitHub Actions and then +pushing them to [Docker Hub](https://hub.docker.com/r/hepdata/hepdata-converter-ws). The Docker image installs +[hepdata-converter-ws from PyPI](https://pypi.org/project/hepdata-converter-ws/) +and then runs the web service (on its default port, 5000). The basic workflow is as follows: -1. Modify Dockerfile (or any other files) (e.g. to fix the pypi version of hepdata-converter-ws) +1. Modify the `Dockerfile` (or any other files) (e.g. to fix the PyPI version of hepdata-converter-ws) 2. Commit it to the repository -3. Push the code -4. Travis will create Docker image from Dockerfile and upload it to DockerHub +3. Push the code to GitHub +4. GitHub Actions will create a Docker image from the ``Dockerfile`` and upload it to Docker Hub ## For developers -Travis already has DockerHub credentials in its encrypted variables. If credentials are ever changed also -update secure variables in Travis build, otherwise the image will be created but not uploaded. +GitHub Actions already has Docker Hub credentials in its encrypted variables. If credentials are ever changed also +update the secure variables in the GitHub Actions build, otherwise the image will be created but not uploaded. -**Warning:** any build on master will trigger upload of the new image (regardless of the branch, - so be cautious about it, especially if you plan to start breaking things) +**Warning:** any build on the main branch (or a tagged release) will trigger upload of the new image, + so be cautious about it, especially if you plan to start breaking things. **Run me**