Skip to content

Commit

Permalink
Impl: automatically publish releases to dockerhub (#3)
Browse files Browse the repository at this point in the history
* update ignore lists
* action to build container and publish to dockerhub
* action run on each release
* update README with docker pull instructions
  • Loading branch information
bcliang committed Jul 8, 2022
1 parent 2e16f79 commit 51c6d24
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#by default ignore everything
*

#include the following
!scripts
!LICENSE
!README.md
28 changes: 28 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and Publish to DockerHub
on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/releases/')
steps:
- uses: actions/checkout@v2

- name: Docker Login - Docker Hub
uses: Azure/docker-login@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Create Release tag
run: |
echo "bcliang/docker-libgourou" > BE_NAME
echo "${GITHUB_REF#refs/tags/releases/}" > RELEASE_TAG
- name: Build the Docker image
run: docker build . --file Dockerfile --tag $(cat BE_NAME):$(cat RELEASE_TAG)
- name: Tag to release + latest
run: |
docker tag $(cat BE_NAME):$(cat RELEASE_TAG) $(cat BE_NAME):latest
- name: Push container to dockerhub
run: docker push --all-tags $(cat BE_NAME)
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# ignore binaries
bin/
adobe/
Adobe-Digital-Editions/
.adept/

# ignore data files
*.acsm
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ This container compiles the reference implementation utilities for libgourou (ma
> docker build . -t bcliang/docker-libgourou
```

### DockerHub

```
> docker pull bcliang/docker-libgourou:latest
```

## Usage

### Automated download and de-drm
Expand Down

0 comments on commit 51c6d24

Please sign in to comment.