Skip to content

Merge pull request #45 from MRR-Group/main #14

Merge pull request #45 from MRR-Group/main

Merge pull request #45 from MRR-Group/main #14

name: Docker Image Publish
on:
push:
branches: [ "production" ]
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Build Docker images
run: docker compose -f ./docker-compose.prod.yml build
-
name: Show result
run: docker images
-
name: Save Docker images to tar
run: docker save -o image.tar steam-buddy_php:latest
-
name: Upload image artifact
uses: actions/upload-artifact@v2
with:
name: image.tar
path: image.tar
release:
needs: [build]
runs-on: ubuntu-latest
steps:
-
name: Download all artifacts
uses: actions/download-artifact@v2
-
name: Display structure of downloaded files
run: ls -R
-
name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.sha }}
release_name: Steam Buddy ${{ github.sha }}
draft: true
prerelease: false'
-
name: Upload image
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: image.tar/image.tar
asset_name: image.tar
asset_content_type: application/tar