Skip to content

Commit aa44789

Browse files
authored
Rivera gh action test (datapunkz#9)
* 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
1 parent 57c4233 commit aa44789

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

.github/deploy.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,18 @@
22
set -e
33
set -o pipefail
44

5+
# Deploy app
56
sudo chmod -R 777 /github/
6-
pip install --user --upgrade pip==18.0
7-
pip install --user --no-cache-dir -r requirements.txt
7+
sudo groupadd docker
8+
sudo usermod -aG docker $USER
9+
# pip install --user --upgrade pip==18.0
10+
# pip install --user --no-cache-dir -r requirements.txt
11+
# echo ${DOCKER_LOGIN}
12+
# echo ${DOCKER_PWD}
813
~/.local/bin/pyinstaller -F hello_world.py
914
export TAG=${GITHUB_SHA}
1015
export IMAGE_NAME='python-cicd-workshop'
11-
export DOCKER_LOGIN='ariv3ra'
12-
export DOCKER_IMAGE_NAME=${DOCKER_LOGIN}/${IMAGE_NAME}
16+
export DOCKER_IMAGE_NAME=ariv3ra/${IMAGE_NAME}
1317
docker build -t ${DOCKER_IMAGE_NAME} -t ${DOCKER_IMAGE_NAME}:${TAG} .
1418
echo ${DOCKER_PWD} | docker login -u ${DOCKER_LOGIN} --password-stdin
1519
docker push ${DOCKER_IMAGE_NAME}

.github/main.workflow

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ action "build_test" {
88
runs = "./.github/build_test.sh"
99
}
1010

11+
1112
action "deploy" {
1213
uses = "docker://circleci/python:2.7.15"
1314
runs = "./.github/deploy.sh"
1415
needs = "build_test"
16+
secrets = ["DOCKER_LOGIN", "DOCKER_PWD"]
1517
}

0 commit comments

Comments
 (0)