fixing workflows and new build for aarch64 (testing)

This commit is contained in:
Michael Trip 2023-10-03 21:06:54 +02:00
parent e0071d4efc
commit f183b8f044
6 changed files with 145 additions and 1 deletions

View file

@ -0,0 +1,80 @@
name: Fedora MATE build aarch64
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
schedule:
- cron: '39 15 * * *'
push:
branches: [ "main" ]
paths:
- "mate/Dockerfile.aarch64"
- ".github/workflows/fedora-mate-build-aarch64.yml"
# Publish semver tags as releases.
tags: [ 'v*.*.*' ]
pull_request:
branches: [ "main" ]
env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}/containerdesk-mate-aarch64
jobs:
build_mate:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: ./mate
file: ./mate/Dockerfile.aarch64
platforms: linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

View file

@ -10,6 +10,9 @@ on:
- cron: '39 15 * * *' - cron: '39 15 * * *'
push: push:
branches: [ "main" ] branches: [ "main" ]
paths:
- "mate/Dockerfile"
- ".github/workflows/fedora-mate-build.yml"
# Publish semver tags as releases. # Publish semver tags as releases.
tags: [ 'v*.*.*' ] tags: [ 'v*.*.*' ]
pull_request: pull_request:

View file

@ -12,6 +12,9 @@ on:
branches: [ "main" ] branches: [ "main" ]
# Publish semver tags as releases. # Publish semver tags as releases.
tags: [ 'v*.*.*' ] tags: [ 'v*.*.*' ]
paths:
- "xfce/Dockerfile"
- ".github/workflows/fedora-xfce-build.yml"
pull_request: pull_request:
branches: [ "main" ] branches: [ "main" ]

View file

@ -10,6 +10,9 @@ on:
- cron: '39 15 * * *' - cron: '39 15 * * *'
push: push:
branches: [ "main" ] branches: [ "main" ]
paths:
- "ubuntu-mate/Dockerfile"
- ".github/workflows/ubuntu-mate-build.yml"
# Publish semver tags as releases. # Publish semver tags as releases.
tags: [ 'v*.*.*' ] tags: [ 'v*.*.*' ]
pull_request: pull_request:

View file

@ -1,4 +1,4 @@
FROM docker.io/linuxserver/rdesktop:fedora-mate FROM ghcr.io/linuxserver/rdesktop:fedora-mate
# set version label # set version label
ARG BUILD_DATE ARG BUILD_DATE

55
mate/Dockerfile.aarch64 Normal file
View file

@ -0,0 +1,55 @@
FROM ghcr.io/linuxserver/rdesktop:arm64v8-fedora-mate
# set version label
ARG BUILD_DATE
ARG VERSION
ARG TARGETARCH
LABEL build_version="based on Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="Michael Trip"
WORKDIR /tmp
RUN dnf install -y wget curl
RUN \
case ${TARGETARCH} in \
"amd64") DOWNLOAD_ARCH=x86_64 ;; \
"arm64") DOWNLOAD_ARCH=aarch64 ;; \
esac \
&& curl -L https://github.com/MuhammedKalkan/OpenLens/releases/download/v6.5.2-366/OpenLens-6.5.2-366.${DOWNLOAD_ARCH}.rpm --output /tmp/openlens.rpm
RUN curl -L https://github.com/derailed/k9s/releases/download/v0.27.4/k9s_Linux_${TARGETARCH}.tar.gz --output /tmp/k9s.tar.gz
RUN \
echo "**** install packages ****" && \
rpm --import https://packages.microsoft.com/keys/microsoft.asc && \
echo -e "[code]\nname=Visual Studio Code\nbaseurl=https://packages.microsoft.com/yumrepos/vscode\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" > /etc/yum.repos.d/vscode.repo && \
dnf install -y --setopt=install_weak_deps=False --best \
terminator \
tilix \
kubernetes-client \
libreoffice \
pluma \
neofetch \
adwaita-gtk2-theme \
adwaita-icon-theme \
papirus-icon-theme \
thunderbird \
firefox \
code && \
dnf localinstall -y /tmp/openlens.rpm && \
tar -zxvf /tmp/k9s.tar.gz && \
mv /tmp/k9s /usr/local/bin && \
echo "**** cleanup ****" && \
dnf autoremove -y && \
dnf clean all && \
rm -rf \
/config/.cache \
/tmp/*
# add local files
COPY /root /
# ports and volumes
EXPOSE 3389
VOLUME /home
VOLUME /config