Skip to content

Commit

Permalink
improve CD config
Browse files Browse the repository at this point in the history
  • Loading branch information
utkuufuk committed Apr 18, 2022
1 parent 1619d9e commit f2be833
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 6 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,19 @@ jobs:
steps:
- name: Check out the repo
uses: actions/checkout@v2

- name: Prepare tags
id: prep
run: |
VERSION=${GITHUB_REF#refs/tags/}
TAGS="${VERSION},latest"
echo ::set-output name=tags::${TAGS}
- name: Push to GitHub Packages
uses: docker/build-push-action@v1
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com
repository: utkuufuk/entrello/image
tag_with_ref: true
tags: ${{ steps.prep.outputs.tags }}
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,25 +117,30 @@ A new Docker image will be created upon each release.

*See `.github/workflows/release.yml` for continuous delivery workflow configuration.*

1. Pull the docker image
1. Login
```sh
docker pull ghcr.io/utkuufuk/entrello/image:<tag>
echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin
```

2. Spawn a container:
2. Pull the docker image
```sh
docker pull ghcr.io/utkuufuk/entrello/image:latest
```

3. Spawn a container:
```sh
# server mode
docker run -d \
--env-file <path/to/.env> \
-p <PORT>:<PORT> \
--restart unless-stopped \
--name entrello \
ghcr.io/utkuufuk/entrello/image:<tag>
ghcr.io/utkuufuk/entrello/image:latest

# runner mode
docker run --rm \
-v <path/to/config.json>:/bin/config.json \
ghcr.io/utkuufuk/entrello/image:<tag> \
ghcr.io/utkuufuk/entrello/image:latest \
./runner
```

Expand Down

0 comments on commit f2be833

Please sign in to comment.