| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- on:
- workflow_dispatch:
- push:
- branches: [ main ]
- pull_request:
- branches: [ main ]
- env:
- REGISTRY: ghcr.io
- IMAGE_NAME: ehfd/nvidia-glx-desktop
- jobs:
- build:
- runs-on: ubuntu-latest
- permissions:
- contents: read
- packages: write
- steps:
- - name: Checkout repository
- uses: actions/checkout@v2
- - name: Log into registry ${{ env.REGISTRY }}
- if: github.event_name != 'pull_request'
- uses: docker/login-action@v1
- with:
- registry: ${{ env.REGISTRY }}
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
- - name: Extract Container metadata
- id: meta
- uses: docker/metadata-action@v3
- with:
- images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- - name: Build and push Ubuntu 18.04 Container image
- uses: docker/build-push-action@v2
- with:
- build-args: |
- UBUNTU_RELEASE=18.04
- context: .
- push: ${{ github.event_name != 'pull_request' }}
- tags: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:18.04
- labels: ${{ steps.meta.outputs.labels }}
- - name: Build and push Ubuntu 20.04 Container image
- uses: docker/build-push-action@v2
- with:
- build-args: |
- UBUNTU_RELEASE=20.04
- context: .
- push: ${{ github.event_name != 'pull_request' }}
- tags: |
- ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
- ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:20.04
- labels: ${{ steps.meta.outputs.labels }}
|