-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Impl: automatically publish releases to dockerhub (#3)
* 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
Showing
4 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters