Skip to content

Commit

Permalink
global: unpin dependencies and other updates
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
GraemeWatt committed Nov 14, 2023
1 parent af0551d commit d1d37c2
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Continuous Integration
on:
push:
pull_request:
branches: [ master ]
branches: [ main ]
release:
types: [ published ]

Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -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**
Expand Down

0 comments on commit d1d37c2

Please sign in to comment.