Skip to content

test commit

test commit #2

Workflow file for this run

name: Build and deploy Docker images
on: push
jobs:
build:
name: Build image '${{ matrix.version }}'
if: ${{ github.repository_owner == 'varigit' }}
strategy:
matrix:
version:
- 14.04
- 16.04
- 18.04
- 20.04
- 22.04
runs-on: ubuntu-20.04
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Get commit SHA
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Login to GitHub Packages
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags:
ghcr.io/${{ github.repository }}/yocto-env:${{ matrix.version }}-${{ env.SHORT_SHA }},
ghcr.io/${{ github.repository }}/yocto-env:${{ matrix.version }}-latest
file: Dockerfile_${{ matrix.version }}