Skip to content

Add workspace cleanup to build.yml (#163) #9

Add workspace cleanup to build.yml (#163)

Add workspace cleanup to build.yml (#163) #9

# /********************************************************************************
# * Copyright (c) 2023 Contributors to the Eclipse Foundation
# *
# * See the NOTICE file(s) distributed with this work for additional
# * information regarding copyright ownership.
# *
# * This program and the accompanying materials are made available under the
# * terms of the Apache License 2.0 which is available at
# * http://www.apache.org/licenses/LICENSE-2.0
# *
# * SPDX-License-Identifier: Apache-2.0
# ********************************************************************************/
name: Build VSS vspec2json container
on:
push:
paths:
- "resources/covesa/**"
workflow_call:
workflow_dispatch:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/leda-vss-vspec2json
jobs:
build:
name: "Build container"
runs-on: ubuntu-22.04
permissions:
packages: write
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: "Build image"
id: image_build
uses: docker/build-push-action@v3
with:
push: true
context: resources/covesa
file: resources/covesa/Dockerfile.vspec2json
platforms: linux/amd64, linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}