-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (42 loc) · 1.35 KB
/
docker-nba-api.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
46
47
48
49
50
name: Create and push nba_api docker image
on:
push:
branches: [ "master" ]
paths:
- 'nba_api/**'
jobs:
buildImage:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to ACR
uses: docker/login-action@v3
with:
registry: ${{ secrets.ACR_SERVER }}
username: ${{ secrets.ACR_USERNAME }}
password: ${{ secrets.ACR_PASSWORD }}
- name: Read version
id: version
uses: juliangruber/read-file-action@v1
with:
path: nba_api/deployment/version
- name: Read version
id: repository
uses: juliangruber/read-file-action@v1
with:
path: nba_api/deployment/repository
- name: Update dockerfile
run: ./deployment/update-dockerfile.sh
working-directory: nba_api
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
context: ./nba_api
file: ./nba_api/deployment/Dockerfile
tags: |
${{ secrets.ACR_SERVER }}/${{ steps.repository.outputs.content }}/nba_api:${{ steps.version.outputs.content }}
${{ secrets.ACR_SERVER }}/${{ steps.repository.outputs.content }}/nba_api:latest