Skip to content

Build Ubuntu 18.04 Images #125

Build Ubuntu 18.04 Images

Build Ubuntu 18.04 Images #125

name: Build Ubuntu 18.04 Images
on:
push:
branches:
- main
paths:
- 'ubuntu-18.04/*'
- '.github/workflows/build-ubuntu-18.04.yml'
pull_request:
workflow_dispatch:
schedule:
- cron: '30 12 * * 5'
concurrency:
# SHA is added to the end if on `main` to let all main workflows run
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == 'refs/heads/main' && github.sha || '' }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Context for Buildx
id: buildx-context
run: |
docker context create builders
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: latest
endpoint: builders
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PAT }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
chianetwork/ubuntu-18.04-builder
tags: |
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=sha,format=long
- name: Build Docker Container
uses: docker/build-push-action@v4
with:
context: ./ubuntu-18.04
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}