-
Notifications
You must be signed in to change notification settings - Fork 4
32 lines (30 loc) · 1.12 KB
/
functions-docker.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
name: "Build and push functions to DockerHub"
on:
push:
branches: [main, develop, test-actions]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- uses: actions/checkout@v3
- name: 'Build main'
if: ${{ github.ref == 'refs/heads/main' }}
run: |
docker build -f Dockerfile_ingress_functions -t turingcropapp/functions:prod . ;
docker push turingcropapp/functions:prod ;
- name: 'Build dev'
if: ${{ github.ref == 'refs/heads/develop' }}
run: |
docker build -f Dockerfile_ingress_functions -t turingcropapp/functions:dev . ;
docker push turingcropapp/functions:dev ;
- name: 'Build test-actions'
if: ${{ github.ref == 'refs/heads/test-actions' }}
run: |
docker build -f Dockerfile_ingress_functions -t turingcropapp/functions:test-actions . ;
docker push turingcropapp/functions:test-actions ;