Release Server ROCK #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: Push to github package | |
run: | | |
new_tag=ghcr.io/canonical/jimm:${{ github.ref_name }} | |
docker tag jimm:latest $new_tag | |
docker push $new_tag |