Skip to content

Commit

Permalink
Switch from Travis to GitHub actions (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonrclarke authored Dec 15, 2020
1 parent e5f0221 commit 06f9593
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 36 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Continuous Integration

on:
push:
pull_request:
branches: [ master ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- 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'
env:
CI_TAG: ${{ github.event.release.tag_name }}
IMAGE_NAME: hepdata-converter-ws
IMAGE_NAME_REMOTE: hepdata/hepdata-converter-ws
DOCKERHUB_USER: ${{ secrets.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
run: |
bash docker_push
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

![Build Status](https://travis-ci.org/HEPData/hepdata-converter-ws-docker.svg?branch=master)
[![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)

# hepdata-converter-ws-docker

Expand Down
6 changes: 3 additions & 3 deletions docker_push
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
TAG_NAME="${TRAVIS_TAG:-latest}"
TAG_NAME="${CI_TAG:-latest}"
docker tag $IMAGE_NAME $IMAGE_NAME_REMOTE:$TAG_NAME
echo "$DOCKER_PASSWORD" | docker login --username=$DOCKER_USERNAME --password-stdin
docker push $IMAGE_NAME_REMOTE:$TAG_NAME
echo "$DOCKERHUB_TOKEN" | docker login --username=$DOCKERHUB_USER --password-stdin
docker push $IMAGE_NAME_REMOTE:$TAG_NAME

0 comments on commit 06f9593

Please sign in to comment.