Skip to content

Commit

Permalink
Rivera gh action test (#9)
Browse files Browse the repository at this point in the history
* Implement Github Actions

* updated gh action lets see

* gh actions fix maybe

* testa gain

* test with correct file path

* test repo file path

* test the ls cmd

* test the ls cmd

* test the ls cmd

* test the ls cmd

* actions with script

* test whoami

* chmod access in this image

* test a failed unit test build

* test deploy

* real tst of deploy

* test deploy

* made file executable

* test deploy settings

* checkin new files

* test pipeline now

* Fixed the file access permissions

* correct the deploy permissions

* test deploy

* added env var

* Added secrets to actions

* test docker envs

* test secrets envs

* test secrets again

* git

* test

* deploy envars

* test

* test deploymnets

* deploy to gh

* deploy

* test

* test envars

* test

* broke it

* fixed it
  • Loading branch information
punkdata authored Feb 27, 2019
1 parent 57c4233 commit aa44789
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@
set -e
set -o pipefail

# Deploy app
sudo chmod -R 777 /github/
pip install --user --upgrade pip==18.0
pip install --user --no-cache-dir -r requirements.txt
sudo groupadd docker
sudo usermod -aG docker $USER
# pip install --user --upgrade pip==18.0
# pip install --user --no-cache-dir -r requirements.txt
# echo ${DOCKER_LOGIN}
# echo ${DOCKER_PWD}
~/.local/bin/pyinstaller -F hello_world.py
export TAG=${GITHUB_SHA}
export IMAGE_NAME='python-cicd-workshop'
export DOCKER_LOGIN='ariv3ra'
export DOCKER_IMAGE_NAME=${DOCKER_LOGIN}/${IMAGE_NAME}
export DOCKER_IMAGE_NAME=ariv3ra/${IMAGE_NAME}
docker build -t ${DOCKER_IMAGE_NAME} -t ${DOCKER_IMAGE_NAME}:${TAG} .
echo ${DOCKER_PWD} | docker login -u ${DOCKER_LOGIN} --password-stdin
docker push ${DOCKER_IMAGE_NAME}
2 changes: 2 additions & 0 deletions .github/main.workflow
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ action "build_test" {
runs = "./.github/build_test.sh"
}


action "deploy" {
uses = "docker://circleci/python:2.7.15"
runs = "./.github/deploy.sh"
needs = "build_test"
secrets = ["DOCKER_LOGIN", "DOCKER_PWD"]
}

0 comments on commit aa44789

Please sign in to comment.