-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.14 KB
/
ci.yml
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
name: CI
on:
push:
release:
types: [ published ]
jobs:
checks:
name: "Run Tests"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: google-github-actions/setup-gcloud@v0
with:
service_account_key: ${{ secrets.GCP_SA_KEY }}
export_default_credentials: true
- run: |
docker-compose run \
-v $GOOGLE_APPLICATION_CREDENTIALS:'/gcloud_auth' \
-e GOOGLE_APPLICATION_CREDENTIALS='/gcloud_auth' \
gtfs-rt-validator pytest tests
build_push:
name: Package docker image
runs-on: ubuntu-18.04
needs: checks
if: github.event_name == 'release' && github.event.action == 'published'
steps:
#- uses: actions/checkout@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v2
with:
push: true
tags: ghcr.io/${{github.repository}}:${{ github.event.release.tag_name }}