Skip to content

Merge pull request #40 from LacledesLAN/dependabot/github_actions/doc… #219

Merge pull request #40 from LacledesLAN/dependabot/github_actions/doc…

Merge pull request #40 from LacledesLAN/dependabot/github_actions/doc… #219

name: linux/amd64
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
repository_dispatch: # Allows action to be triggered via webhook
workflow_dispatch: # Allows action to be run manually from the Actions tab
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up QEMU
uses: docker/setup-qemu-action@v3.1.0
- name: Pull Latest Linux Base Image
run: docker pull lacledeslan/gamesvr-dods
- name: Build Linux Image
uses: docker/build-push-action@v6.3.0
with:
context: .
file: ./linux.Dockerfile
tags: |
lacledeslan/gamesvr-dods-freeplay:latest
ghcr.io/lacledeslan/gamesvr-dods-freeplay:latest
build-args: |
BUILDNODE=GitHub (Run Number: ${{ github.run_number }} Run ID: ${{ github.run_id }})
SOURCE_COMMIT=${{ github.sha }}
no-cache: true
- name: Test Linux Image
run: docker run --rm lacledeslan/gamesvr-dods-freeplay:latest /app/ll-tests/gamesvr-dods-freeplay.sh
- name: Login to DockerHub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3.2.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GitHub Container Registry
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3.2.0
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_TOKEN }}
- name: Push to Docker HUB
if: ${{ github.event_name != 'pull_request' }}
run: docker push lacledeslan/gamesvr-dods-freeplay:latest
- name: Push to GitHub Packages
if: ${{ github.event_name != 'pull_request' }}
run: docker push ghcr.io/lacledeslan/gamesvr-dods-freeplay:latest