Skip to content

feat(Images): Initial commit for building ubuntu image with i915 supp… #7

feat(Images): Initial commit for building ubuntu image with i915 supp…

feat(Images): Initial commit for building ubuntu image with i915 supp… #7

Workflow file for this run

name: Build and Push Docker Image with Git Tag
on:
push:
tags:
- '*'
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
run: echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin
- name: Extract tag name
run: echo "TAG_NAME=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV
- name: Build and push Docker image
run: |
dist="ubuntu-hw"
if [ -n "$TAG_NAME" ]; then
docker build -t ghcr.io/${{ github.repository_owner }}/$dist:$TAG_NAME "./images/$dist"
docker push ghcr.io/${{ github.repository }}:$tag
else
echo "Skipping - tag name not found."
fi
env:
TAG_NAME: ${{ env.TAG_NAME }}