Add GitHub Actions workflow for building and publishing
This commit is contained in:
40
.github/workflows/build.yml
vendored
Normal file
40
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
name: Build and Publish TVJ EPG Image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Podman
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y podman
|
||||||
|
|
||||||
|
- name: Log in to GitHub Container Registry
|
||||||
|
run: |
|
||||||
|
echo "${{ secrets.GHCR_TOKEN }}" | podman login ghcr.io \
|
||||||
|
-u ${{ github.actor }} \
|
||||||
|
--password-stdin
|
||||||
|
|
||||||
|
- name: Build image with Podman
|
||||||
|
run: |
|
||||||
|
podman build \
|
||||||
|
-f Containerfile \
|
||||||
|
-t ghcr.io/${{ github.repository }}:latest \
|
||||||
|
.
|
||||||
|
|
||||||
|
- name: Push image to GHCR
|
||||||
|
run: |
|
||||||
|
podman push ghcr.io/${{ github.repository }}:latest
|
||||||
Reference in New Issue
Block a user