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

docs: Add notes on how to publish feeds and retrieve the feeds list u… #139

docs: Add notes on how to publish feeds and retrieve the feeds list u…

docs: Add notes on how to publish feeds and retrieve the feeds list u… #139

Workflow file for this run

name: Docker CI
on:
push:
pull_request:
schedule:
- cron: "0 0 * * 0"
jobs:
build-linux:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
target:
- src: .
image: ghcr.io/pojntfx/atmosfeed-server
arch: "linux/amd64,linux/arm64/v8,linux/s390x" # linux/arm/v5,linux/arm/v7,linux/386,linux/mips64le,linux/ppc64le,
file: Dockerfile
steps:
- name: Maximize build space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
- name: Checkout
uses: actions/checkout@v2
- name: Extract branch name
id: extract_branch
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up metadata
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ matrix.target.image }}
tags: type=semver,pattern={{version}}
- name: Build image
uses: docker/build-push-action@v2
with:
context: ${{ matrix.target.src }}
file: ${{ matrix.target.src }}/${{ matrix.target.file }}
platforms: ${{ matrix.target.arch }}
push: false
tags: ${{ matrix.target.image }}:${{ steps.extract_branch.outputs.branch }}
labels: ${{ steps.meta.outputs.labels }}
- name: Push pre-release image to Docker Hub
if: ${{ github.ref == 'refs/heads/main' }}
uses: docker/build-push-action@v2
with:
context: ${{ matrix.target.src }}
file: ${{ matrix.target.src }}/${{ matrix.target.file }}
platforms: ${{ matrix.target.arch }}
push: true
tags: ${{ matrix.target.image }}:${{ steps.extract_branch.outputs.branch }}
labels: ${{ steps.meta.outputs.labels }}
- name: Push release image to Docker Hub
if: startsWith(github.ref, 'refs/tags/v')
uses: docker/build-push-action@v2
with:
context: ${{ matrix.target.src }}
file: ${{ matrix.target.src }}/${{ matrix.target.file }}
platforms: ${{ matrix.target.arch }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}