Skip to content

Commit 1bf738d

Browse files
authored
Add workflow for publishing Docker images (#342)
Signed-off-by: Andy Bavier <andybavier@gmail.com>
1 parent 41a4c6b commit 1bf738d

File tree

2 files changed

+46
-8
lines changed

2 files changed

+46
-8
lines changed

.github/workflows/push.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
# Copyright 2024 Intel Corporation
3+
# Copyright 2025 Canonical Ltd.
4+
name: Release Pipeline
5+
6+
on:
7+
push:
8+
branches:
9+
- master
10+
paths:
11+
- "VERSION"
12+
13+
permissions:
14+
contents: read
15+
16+
jobs:
17+
# Tag GitHub Release
18+
# The convention is to prefix the version with a 'v', e.g., v1.2.3
19+
tag-github:
20+
uses: onosproject/.github/.github/workflows/tag-github.yml@main
21+
with:
22+
add_v: true
23+
secrets: inherit
24+
25+
# Build and Release Docker Image
26+
# The convention is to use the same tag for the Docker image as the GitHub Release
27+
release-image:
28+
needs: tag-github
29+
if: needs.tag-github.outputs.changed == 'true'
30+
permissions:
31+
contents: read
32+
packages: write
33+
actions: read
34+
id-token: write
35+
attestations: write
36+
uses: onosproject/.github/.github/workflows/release-image.yml@main
37+
with:
38+
docker_tag: ${{ needs.tag-github.outputs.version }}
39+
secrets: inherit
40+
41+
# Bump Version
42+
update-version:
43+
needs: tag-github
44+
if: needs.tag-github.outputs.changed == 'true'
45+
uses: onosproject/.github/.github/workflows/bump-version.yml@main
46+
secrets: inherit

Makefile

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,6 @@ images: aether-roc-gui-docker
8787
docker-build: aether-roc-gui-docker
8888

8989
docker-push: # push to docker registy: use DOCKER_REGISTRY, DOCKER_REPOSITORY and DOCKER_TAG to customize
90-
ifdef DOCKER_USER
91-
ifdef DOCKER_PASSWORD
92-
echo ${DOCKER_PASSWORD} | docker login -u ${DOCKER_USER} --password-stdin
93-
else
94-
@echo "DOCKER_USER is specified but DOCKER_PASSWORD is missing"
95-
@exit 1
96-
endif
97-
endif
9890
docker push ${DOCKER_IMAGENAME}
9991

10092
kind-only:

0 commit comments

Comments
 (0)