Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gitactions testing #31

Merged
merged 9 commits into from
Aug 5, 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
39 changes: 39 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: github actions

on:
push:
branches:
- "gitactions"

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: code checkout
uses: actions/checkout@v2

- name: install the gcloud cli
uses: google-github-actions/setup-gcloud@v0
with:
project_id: ${{ secrets.GOOGLE_PROJECT }}
service_account_key: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
export_default_credentials: true

- name: build and push the docker image
env:
GOOGLE_PROJECT: ${{ secrets.GOOGLE_PROJECT }}
run: |
gcloud auth configure-docker us-east1-docker.pkg.dev
docker build -t us-east1-docker.pkg.dev/${{ secrets.GOOGLE_PROJECT }}/cbr-testing/nginx:latest .
docker push us-east1-docker.pkg.dev/${{ secrets.GOOGLE_PROJECT }}/cbr-testing/nginx:latest

- name: install python
uses: actions/setup-python@v2
with:
python-version: "3.12.3"

- name: install dependencies
run: pip install -e '.[dev]'

- name: run pytest
run: pytest
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM nginx:latest

RUN echo "Hello World" > /usr/share/nginx/html/index.html
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ clonebuildregister
******************

Clones a repository, builds a docker image from that repository, and then pushes that image to google cloud artifact registry

To use clonebuildregister as a package:

>>> from clonebuildregister.clonebuildregister import clonebuildregister
Expand Down
4 changes: 2 additions & 2 deletions tests/testing_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
to google cloud.
"""

GCLOUD_PROJECT = "bimage-project-423316"
GCLOUD_REPOSITORY = "bimage-repository"
GCLOUD_PROJECT = "cznet-393818"
GCLOUD_REPOSITORY = "cbr-testing"

GCLOUD_LOCATION = "us-east1"

Expand Down
Loading