Skip to content

add action

add action #32

Workflow file for this run

name: export layer
on:
pull_request:
push:
tags:
- 'v*.*.*'
permissions:
contents: read
id-token: write
jobs:
get-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.get_version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get version
id: get_version
run: |
if [ -f package.oo.yaml ]; then
version=$(yq eval '.version' package.oo.yaml)
echo "version=$version" >> "$GITHUB_OUTPUT"
elif [ -f package.oo.yml ]; then
version=$(yq eval '.version' package.oo.yml)
echo "version=$version" >> "$GITHUB_OUTPUT"
else
echo "No valid package file found"
exit 1
fi
export-layer:
needs: get-version
permissions:
contents: read
id-token: write
uses: oomol/ovmlayer-rootfs/.github/workflows/export-package-layer.yml@main
with:
package-name: "layer-example"
version: "${{ needs.get-version.outputs.version }}"
secrets:
token: ${{ secrets.GITHUB_TOKEN }}