-
Notifications
You must be signed in to change notification settings - Fork 109
82 lines (73 loc) · 2.33 KB
/
docker.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# SPDX-License-Identifier: Apache-2.0
# Copyright 2020 Intel Corporation
name: Docker image
on:
push:
branches:
- master
tags:
- v*
jobs:
build:
env:
DOCKER_REGISTRY: "ghcr.io/omec-project/"
DOCKER_REPOSITORY: "upf-epc/"
runs-on: ubuntu-latest
steps:
# Checkout and build
- uses: actions/checkout@v3
- uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Build and push Docker image
run: |
make docker-build
make docker-push
push-dockerhub:
env:
DOCKER_REGISTRY: "docker.io/"
DOCKER_REPOSITORY: "omecproject/"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: echo GIT_SHA_SHORT=$(git rev-parse --short HEAD) >> $GITHUB_ENV
- id: docker-login
uses: docker/[email protected]
with:
registry: docker.io
username: ${{ secrets.DOCKERHUB_LOGIN }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Build and push "master-latest" Docker images for Haswell CPU
env:
DOCKER_TAG: master-latest
CPU: haswell
run: |
docker pull ${DOCKER_REPOSITORY}upf-epc-bess:$DOCKER_TAG
docker pull ${DOCKER_REPOSITORY}upf-epc-pfcpiface:$DOCKER_TAG
CPU=$CPU make docker-build
make docker-push
- name: Build and push "master-GIT_SHA" Docker images for Haswell CPU
env:
DOCKER_TAG: master-latest-${{ env.GIT_SHA_SHORT }}
CPU: haswell
run: |
CPU=$CPU make docker-build
make docker-push
- name: Build and push "master-latest-ivybridge" Docker images for Ivybridge CPU
env:
DOCKER_TAG: master-latest-ivybridge
CPU: ivybridge
run: |
docker pull ${DOCKER_REPOSITORY}upf-epc-bess:$DOCKER_TAG
docker pull ${DOCKER_REPOSITORY}upf-epc-pfcpiface:$DOCKER_TAG
CPU=$CPU make docker-build
make docker-push
- name: Build and push "master-GIT_SHA-ivybridge" Docker images for Ivybridge CPU
env:
DOCKER_TAG: master-latest-ivybridge-${{ env.GIT_SHA_SHORT }}
CPU: ivybridge
run: |
CPU=$CPU make docker-build
make docker-push