-
Notifications
You must be signed in to change notification settings - Fork 8
44 lines (36 loc) · 1.24 KB
/
release-server-rock.yaml
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
name: Release Server ROCK
on:
# Note that when running via workflow_dispatch, the github.ref_name
# variable will match the selected branch name used.
workflow_dispatch:
push:
tags:
- 'v*'
jobs:
publish:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- run: git fetch --tags --force origin # https://github.com/actions/checkout/issues/882 & https://github.com/actions/checkout/issues/290
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: ln rockcraft.yaml
run: ln -s ./rocks/jimm.yaml ./rockcraft.yaml
- name: Build ROCK
uses: canonical/craft-actions/rockcraft-pack@main
- name: Load ROCK into local registry
run: make load-rock
- name: Run Trivy vulnerability scanner
uses: aquasecurity/[email protected]
with:
image-ref: 'jimm:latest'
- name: Push to github package
run: |
new_tag=ghcr.io/canonical/jimm:${{ github.ref_name }}
docker tag jimm:latest $new_tag
docker push $new_tag