Skip to content

Commit 8a86ed0

Browse files
committed
ci: add github workflow for publishing container images
Publishes container images of the reference plugins at ghcr.io/containerd/nri/plugins/<plugin>:<tag> The tag is the git tag name for tagged versions and "unstable" for the main branch.
1 parent be8b1e7 commit 8a86ed0

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/images.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Publish Container Images
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags:
8+
- v[0-9]+.[0-9]+.[0-9]+
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
publish-images:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
packages: write
19+
contents: read
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
with:
25+
fetch-depth: 0
26+
27+
- name: Log in to registry
28+
uses: docker/login-action@v3
29+
with:
30+
registry: ghcr.io
31+
username: ${{ github.repository_owner }}
32+
password: ${{ secrets.GITHUB_TOKEN }}
33+
34+
- name: Build and push images
35+
env:
36+
IMAGE_REPO_BASE: ghcr.io/${{ github.repository }}
37+
run: |
38+
GITREF=${{ github.ref }}
39+
case $GITREF in
40+
refs/heads/main)
41+
VERSION=unstable
42+
;;
43+
*)
44+
;;
45+
esac
46+
47+
make plugin-images
48+
make plugin-images-push
49+

0 commit comments

Comments
 (0)