-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (34 loc) · 1.06 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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/clone-build-registry/clone-build-registry/nginx:latest .
docker push us-east1-docker.pkg.dev/clone-build-registry/clone-build-registry/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