diff --git a/.github/workflows/docker-branch-build.yml b/.github/workflows/docker-branch-build.yml new file mode 100644 index 00000000..7001d089 --- /dev/null +++ b/.github/workflows/docker-branch-build.yml @@ -0,0 +1,21 @@ +name: docker-branch-build +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:branch-${{ github.head_ref }} + docker push degicadev/kaiser:branch-${{ github.head_ref }} + +'on': + push: + branches: + - '*' diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 00000000..3a127607 --- /dev/null +++ b/.github/workflows/docker.yml @@ -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' \ No newline at end of file diff --git a/README.md b/README.md index 2de64778..69ad582b 100644 --- a/README.md +++ b/README.md @@ -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 ```