Skip to content

Bump github actions

Bump github actions #7

Workflow file for this run

name: static-container-registry
on: push
env:
DOCKER_IMAGE: ghcr.io/${{ github.repository }}
jobs:
pylint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: "3.10"
#TODO: add annotations
#- uses: cclauss/[email protected]
- name: Install dependencies
run: |
pip install pylint
- name: Analysing the code with pylint
run: |
pylint `ls -R|grep .py$|xargs`
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildk
uses: docker/setup-buildx-action@v3
- name: Login to Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: "${{ env.DOCKER_IMAGE }}:${{ github.sha }}"
cache-from: type=gha
cache-to: type=gha,mode=max
test:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
OS=xUbuntu_20.04
CRIO_VERSION=1.21
KUBIC_REPO=https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable
sudo tee /etc/apt/sources.list.d/kubic-libcontainers.list <<< "deb $KUBIC_REPO/$OS/ /"
sudo tee -a /etc/apt/sources.list.d/kubic-libcontainers.list <<< "deb $KUBIC_REPO:/cri-o:/$CRIO_VERSION/$OS/ /"
curl -L $KUBIC_REPO/$OS/Release.key | sudo apt-key add -
curl -L $KUBIC_REPO:/cri-o:/$CRIO_VERSION/$OS/Release.key | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install cri-o cri-o-runc cri-tools hardlink
# Fix libpcre2-posix2 package version, use the
sudo apt-get -y install --reinstall --allow-downgrades libpcre2-posix2/$(lsb_release -cs)
# Also need oras, skopeo ; but they are already installed
bash <(curl -s https://raw.githubusercontent.com/pgrange/bash_unit/master/install.sh)
# Start cri-o service
sudo systemctl start crio
# TODO: cache the installed image?
- name: Unit testing with bash_unit
run: |
export IMAGE="${{ env.DOCKER_IMAGE }}:${{ github.sha }}"
sudo FORCE_COLOR=true ./bash_unit test.sh
# TODO: parse individual tests results (in TAP format)
# - uses: dorny/test-reporter@v1
# if: success() || failure()