Skip to content

ubuntu2404

ubuntu2404 #34

Workflow file for this run

---
name: ubuntu2404
on:
pull_request:
push:
paths:
- 'ubuntu2404/**'
- '.github/workflows/ubuntu2404.yml'
schedule:
- cron: '10 6,15 * * 1,6'
workflow_dispatch:
permissions: write-all
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
jobs:
# Test the image builds and works correctly.
test:
name: Test ubuntu2404
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
steps:
- uses: actions/[email protected]
- name: Test building image.
run: cd ubuntu2404 && docker build -t ubuntu2404 .
- name: Run the built image.
run: docker run --name test-container -d --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:rw ubuntu2404
# If on master branch, build and release image.
release:
name: Release
runs-on: ubuntu-latest
# needs: test
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/[email protected]
- name: Login to DockerHub
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Logain to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image.
uses: docker/[email protected]
with:
context: ubuntu2404/
file: ubuntu2404/Dockerfile
platforms: linux/amd64, linux/arm64, linux/arm64/v8
push: true
tags: |
${{ github.repository }}:ubuntu2404, ${{ github.repository }}:noble