Skip to content

Update dm-verity as a separate layer #1

Update dm-verity as a separate layer

Update dm-verity as a separate layer #1

name: Push SKR Image
on:
workflow_dispatch:
pull_request:
branches:
- main
paths:
- .github/workflows/push_skr_image.yml
- cmd/skr/**
- docker/skr/**
- tools/get-snp-report/**
- vendor/**
- internal/**
- pkg/**
push:
branches:
- main
paths:
- .github/workflows/push_skr_image.yml
- cmd/skr/**
- docker/skr/**
- tools/get-snp-report/**
- vendor/**
- internal/**
- pkg/**
jobs:
push-skr-image:
name: Push SKR Image
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Log in to Azure Container Registry
run: |
az acr login \
--name ${{ secrets.REGISTRY_NAME }} \
--username ${{ secrets.REGISTRY_NAME }} \
--password ${{ secrets.REGISTRY_PASSWORD }}
- name: Build Image
run: docker/skr/build.sh
- name: Push Image
run: |
if [ ${{ github.event_name }} == "push" ]; then
branch_name=main
elif [ ${{ github.event_name }} == "workflow_dispatch" ]; then
branch_name=${{ github.ref }}
branch_name=${branch_name:11}
else
branch_name=${{ github.head_ref }}
fi
image_tag=$(echo ${branch_name:0:128} | sed 's/[^a-zA-Z0-9]/-/g')
docker/skr/push.sh \
${{ secrets.REGISTRY_NAME }} \
${{ secrets.REGISTRY_DOMAIN }} \
skr:$image_tag \
--skip-login