24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-16 22:05:29 +02:00
xmpp.chapril.org-ejabberd/.github/workflows/container.yml
Badlop 9a3ba9d76f Update Github Action workflows: Ubuntu 18 is deprecated and 22 is added
CI:
- Update Ubuntu to 20.04, the lowest available starting in April 2023 [1]
- Don't test 19.3, as it isn't available in Ubuntu 20.04
- Use OTP 25 for Shellcheck, Coveralls, ECIL page
- Use erlef instead of ErlGang, supports better old erlangs in new ubuntus
- Remove support for rebar2 testing, as that's done in Runtime

CI-19.3:
- Add a temporary workflow for testing ejabberd with OTP 19.3

Container and Runtime:
- Update Ubuntu to latest (22.04)

[1] https://github.com/actions/runner-images/issues/6002
https://github.com/ErlGang/setup-erlang
https://github.com/erlef/setup-beam
2022-09-06 13:33:58 +02:00

70 lines
1.8 KiB
YAML

name: Container
on:
push:
paths-ignore:
- '.devcontainer/**'
- 'examples/**'
- 'lib/**'
- 'man/**'
- 'priv/**'
- '**.md'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
container:
name: Container
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Log in to the Container registry
uses: docker/login-action@v1.14.1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get git describe
id: gitdescribe
run: echo "::set-output name=ver::$(git describe --tags)"
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3.8.0
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
labels: |
org.opencontainers.image.revision=${{ steps.gitdescribe.outputs.ver }}
org.opencontainers.image.licenses=GPL-2.0
org.opencontainers.image.vendor=ProcessOne
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Build and push Docker image
uses: docker/build-push-action@v2.10.0
with:
build-args: |
REPOSITORY=https://github.com/${{ github.repository }}.git
VERSION=${{ steps.gitdescribe.outputs.ver }}
cache-from: type=gha
cache-to: type=gha,mode=max
context: .github/container
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}