Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Update README.md

Update README.md #53

Workflow file for this run

name: Build images on push
permissions:
packages: write
on:
push:
branches:
- master
jobs:
build:
name: Build image
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
architecture:
- "arm64"
- "amd64"
base:
- "buster"
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Set env variables
run: |
echo "BRANCH=$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//-/g')" >> $GITHUB_ENV
echo "IMAGE_NAME=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Setup Docker buildx action
uses: docker/setup-buildx-action@v1
- name: Run Docker buildx
run: |
docker buildx build --platform linux/${{ matrix.architecture }} \
--tag ghcr.io/${{ github.repository_owner }}/${IMAGE_NAME}:${BRANCH}-${{ matrix.base }}-${{ matrix.architecture }} --output "type=registry" \
--build-arg version=${BRANCH} \
./
create-manifest:
name: Create manifest
runs-on: ubuntu-20.04
needs: build
strategy:
matrix:
base:
- "buster"
steps:
- name: Checkout project
uses: actions/checkout@v2
- name: Set env variables
run: |
echo "BRANCH=$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//-/g')" >> $GITHUB_ENV
echo "IMAGE_NAME=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create final manifest
run: ./create-manifest.sh "ghcr.io/${{ github.repository_owner }}/${IMAGE_NAME}" "${BRANCH}" "${{ matrix.base }}"