Skip to content

Commit

Permalink
Edit Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ehfd authored Oct 21, 2023
1 parent 2c0606e commit 72c852e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 48 deletions.
64 changes: 19 additions & 45 deletions .github/workflows/container-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions egl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 72c852e

Please sign in to comment.