Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

Automatically push docker containers #99

Merged
merged 2 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/docker-branch-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: docker-branch-build
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: extract_branch
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: degicadev
password: ${{ secrets.DOCKERHUB_PAT }}
- name: setup
run: |-
docker build . -t degicadev/kaiser:branch-${{ steps.extract_branch.outputs.branch }}
docker push degicadev/kaiser:branch-${{ steps.extract_branch.outputs.branch }}

'on':
push:
branches:
- '*'
24 changes: 24 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: docker
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: degicadev
password: ${{ secrets.DOCKERHUB_PAT }}
- name: setup
run: |-
docker build . -t degicadev/kaiser:latest
docker push degicadev/kaiser:latest
docker build . -t degicadev/kaiser:`bin/version`
docker push degicadev/kaiser:`bin/version`

'on':
push:
branches:
- 'master'
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ docker build -t degica/kaiser .
And then add the following line to your `.bashrc` or `.bash_profile`

```
alias kaiser='docker run --rm -ti -v /var/run/docker.sock:/var/run/docker.sock -v $HOME/.kaiser:/root/.kaiser -v `pwd`:`pwd` -e CONTEXT_DIR="`pwd`" degica/kaiser'
alias kaiser='docker run --pull=always --rm -ti -v /var/run/docker.sock:/var/run/docker.sock -v $HOME/.kaiser:/root/.kaiser -v `pwd`:`pwd` -e CONTEXT_DIR="`pwd`" degicadev/kaiser'
```

Or if you use fish

```
function kaiser
docker run --rm -ti -v /var/run/docker.sock:/var/run/docker.sock -v $HOME/.kaiser:/root/.kaiser -v (pwd):(pwd) -e CONTEXT_DIR=(pwd) degica/kaiser $argv
docker run --pull=always --rm -ti -v /var/run/docker.sock:/var/run/docker.sock -v $HOME/.kaiser:/root/.kaiser -v (pwd):(pwd) -e CONTEXT_DIR=(pwd) degicadev/kaiser $argv
end
```

Expand Down
Loading