Skip to content

Commit cc8faac

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 9aa3c3e commit cc8faac

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/images.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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 }}/plugins
37+
run: |
38+
case ${{ github.ref }} in
39+
refs/heads/main)
40+
export VERSION=unstable
41+
;;
42+
esac
43+
44+
make plugin-images
45+
make plugin-images-push
46+

0 commit comments

Comments
 (0)