Skip to content

Ubuntu Jammy

Ubuntu Jammy #54

Workflow file for this run

name: Ubuntu Jammy
on:
workflow_dispatch:
schedule:
- cron: '12 21 * * 2'
push:
branches: [ "main" ]
paths:
- "ubuntu-jammy/**"
pull_request:
branches: [ "main" ]
paths:
- "ubuntu-jammy/**"
env:
# The default repo env will be 'ComputeStacks'; uppercase is not allowed.
GH_REPO: computestacks/cs-docker-base
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log into Github Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log into DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
id: build-and-push
uses: docker/build-push-action@v3
with:
context: ubuntu-jammy/
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: |
cmptstks/baseimage:ubuntu-jammy
cmptstks/baseimage:latest
ghcr.io/${{ env.GH_REPO }}:ubuntu-jammy
ghcr.io/${{ env.GH_REPO }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max