From 72c852e403e10c9ed87da11d43d554ab348b4f5e Mon Sep 17 00:00:00 2001 From: Seungmin Kim <8457324+ehfd@users.noreply.github.com> Date: Sun, 22 Oct 2023 01:38:07 +0900 Subject: [PATCH] Edit Actions workflow --- .github/workflows/container-publish.yml | 64 ++++++++----------------- Dockerfile | 1 - egl.yml | 2 - 3 files changed, 19 insertions(+), 48 deletions(-) diff --git a/.github/workflows/container-publish.yml b/.github/workflows/container-publish.yml index 2eb5332..2b6415e 100644 --- a/.github/workflows/container-publish.yml +++ b/.github/workflows/container-publish.yml @@ -12,70 +12,44 @@ env: REGISTRY: ghcr.io IMAGE_NAME: selkies-project/nvidia-egl-desktop jobs: - build-2004: + build: runs-on: ubuntu-latest permissions: contents: read packages: write + strategy: + matrix: + include: + - os_version: "20.04" + latest_version: false + - os_version: "22.04" + latest_version: true steps: - name: Checkout repository uses: actions/checkout@v4 - name: Fetch commit time - run: echo "COMMIT_TIME_GIT=$(TZ=UTC git show -s --format='%cd' --date=format-local:'%Y%m%d%H%M%S')" >> $GITHUB_ENV + run: echo "COMMIT_TIME_GIT=$(TZ=UTC git show -s --format='%cd' --date=format-local:'%Y%m%d%H%M%S')" >> "$GITHUB_ENV" - name: Log into registry ${{ env.REGISTRY }} - if: github.event_name != 'pull_request' - uses: docker/login-action@v2 + if: ${{ github.event_name != 'pull_request' }} + uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract Container metadata + - name: Extract container metadata id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - name: Build and push Ubuntu 20.04 Container image - uses: docker/build-push-action@v4 + - name: Build and push Ubuntu ${{ matrix.os_version }} container image + uses: docker/build-push-action@v5 with: build-args: | - UBUNTU_RELEASE=20.04 + UBUNTU_RELEASE=${{ matrix.os_version }} context: . push: ${{ github.event_name != 'pull_request' }} tags: | - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:20.04 - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:20.04-${{ env.COMMIT_TIME_GIT }} - labels: ${{ steps.meta.outputs.labels }} - build-2204: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - name: Fetch commit time - run: echo "COMMIT_TIME_GIT=$(TZ=UTC git show -s --format='%cd' --date=format-local:'%Y%m%d%H%M%S')" >> $GITHUB_ENV - - name: Log into registry ${{ env.REGISTRY }} - if: github.event_name != 'pull_request' - uses: docker/login-action@v2 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - name: Extract Container metadata - id: meta - uses: docker/metadata-action@v4 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - name: Build and push Ubuntu 22.04 Container image - uses: docker/build-push-action@v4 - with: - build-args: | - UBUNTU_RELEASE=22.04 - context: . - push: ${{ github.event_name != 'pull_request' }} - tags: | - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:22.04 - ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:22.04-${{ env.COMMIT_TIME_GIT }} + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.os_version }} + ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ matrix.os_version }}-${{ env.COMMIT_TIME_GIT }} + ${{ matrix.latest_version == 'true' && format('{0}/{1}:latest', env.REGISTRY, env.IMAGE_NAME) || '' }} labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index 8d66f7e..aab850e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,7 +40,6 @@ ENV PASSWD mypasswd ENV NOVNC_ENABLE false ENV WEBRTC_ENCODER nvh264enc ENV WEBRTC_ENABLE_RESIZE false -ENV ENABLE_AUDIO true ENV ENABLE_BASIC_AUTH true # Set versions for components that should be manually checked before upgrading, other component versions are automatically determined by fetching the version online diff --git a/egl.yml b/egl.yml index 9861b50..8c23a5b 100644 --- a/egl.yml +++ b/egl.yml @@ -63,8 +63,6 @@ spec: value: "nvh264enc" - name: WEBRTC_ENABLE_RESIZE value: "false" - - name: ENABLE_AUDIO - value: "true" - name: ENABLE_BASIC_AUTH value: "true" # Defaults to `PASSWD` if unspecified, choose either `value:` or `secretKeyRef:` but not both at the same time