forked from open-edge-platform/edge-ai-libraries
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtimeseries-build-weekly-images.yaml
More file actions
48 lines (43 loc) · 1.65 KB
/
timeseries-build-weekly-images.yaml
File metadata and controls
48 lines (43 loc) · 1.65 KB
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
name: "[Time Series Analytics] Build weekly imgs"
run-name: "[Time Series Analytics] Build weekly imgs"
on:
schedule:
- cron: '0 14 * * 2' # 14:00 UTC
workflow_dispatch:
permissions: {}
jobs:
time-series-analytics-microservice-weekly:
name: Weekly-Build TimeSeries Analytics Microservice img
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
steps:
- name: Check out edge-ai-libraries repository
uses: actions/checkout@v1
with:
persist-credentials: false
path: edge-ai-libraries-repo
- name: Log in to GitHub Container Registry
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 #3.4.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build time-series-analytics-microservices
run: |
cd microservices/time-series-analytics/docker
sed -i "s|DOCKER_REGISTRY=.*|DOCKER_REGISTRY=ghcr.io/${{ github.repository }}/|g" .env
docker compose build --no-cache --pull
- name: Push Docker img
run: |
IMAGE_NAME=$(grep '^TIME_SERIES_ANALYTICS_IMAGE=' microservices/time-series-analytics/docker/.env | cut -d'=' -f2)
docker push ghcr.io/${{ github.repository }}/$IMAGE_NAME
- name: Clean up
if: always()
run: |
rm -rf edge-ai-libraries-repo
IMAGE_NAME=$(grep '^TIME_SERIES_ANALYTICS_IMAGE=' microservices/time-series-analytics/docker/.env | cut -d'=' -f2)
docker rmi ghcr.io/${{ github.repository }}/$IMAGE_NAME || true