Skip to content

Container mode

Container mode #4

Workflow file for this run

---
name: Build the container image
on:
push:
branches:
- "main"
pull_request:
schedule:
- cron: "0 0 * * *"
jobs:
docker:
runs-on: ubuntu-latest
name: Build and publish the container with docker
strategy:
fail-fast: false
matrix:
distri:
- centos
- tumbleweed
- fedora
steps:
- uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push the image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64
file: "Containerfile.${{ matrix.distri }}"
push: ${{ contains(github.ref, 'refs/heads/main') || contains(github.ref, 'refs/tags/') }}
tags: |
ghcr.io/dcermak/rpm-spec-language-server:${{ matrix.distri }}