Skip to content

Test Docker container action #6

Test Docker container action

Test Docker container action #6

Workflow file for this run

name: Build images for Docker container actions
on:
push:
branches: [trunk]
pull_request:
branches: [trunk]
permissions:
contents: read
packages: write
jobs:
build_actions:
name: Build images for Docker container actions
runs-on: ubuntu-latest
strategy:
matrix:
action-dir: [gh-actions-docs]
env:
IMAGE_NAME: 'ghcr.io/3lvia/core-github-actions-templates/${{ matrix.action-dir }}:latest'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: 'ghcr.io'
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build image
uses: docker/build-push-action@v5
with:
context: '${{ matrix.action-dir }}'
push: true
tags: '${{ env.IMAGE_NAME }}'
cache-from: 'type=registry,ref=${{ env.IMAGE_NAME }}'
cache-to: 'type=inline'