Skip to content

Commit

Permalink
feat(CI): publish rock with branch tag on manual dispatch
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaumebeuzeboc committed Mar 18, 2024
1 parent 7ca7eb5 commit 1c07511
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 60 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/rock-release-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# does not allow setting a GHCR repo where to publish at the moment.
# We thus copy it below and adapt it.

name: Build ROCK and release dev tag to GHCR
name: Build ROCK and release dev or branch tag to GHCR

on:
workflow_dispatch:
Expand Down Expand Up @@ -41,7 +41,14 @@ jobs:

- name: Upload ROCK to ghcr.io
run: |
sudo skopeo --insecure-policy copy oci-archive:$(realpath ${{ steps.rockcraft.outputs.rock }}) docker://ghcr.io/ubuntu-robotics/cos-registration-server:dev --dest-creds "${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}"
if [[ ${{ github.ref }} == 'refs/heads/main' ]]
then
TAG=dev
else
TAG=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
TAG=$(echo $TAG | sed "s|\/|\_|")
fi
sudo skopeo --insecure-policy copy oci-archive:$(realpath ${{ steps.rockcraft.outputs.rock }}) docker://ghcr.io/ubuntu-robotics/cos-registration-server:$TAG --dest-creds "${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}"
- name: Generate digest
run: |
digest=$(skopeo inspect oci-archive:$(realpath ${{ steps.rockcraft.outputs.rock }}) --format '{{.Digest}}')
Expand Down
58 changes: 0 additions & 58 deletions .github/workflows/rock-release-pr.yaml

This file was deleted.

0 comments on commit 1c07511

Please sign in to comment.