Skip to content

Build and Push Docker Image #2

Build and Push Docker Image

Build and Push Docker Image #2

Workflow file for this run

name: Build and Push Docker Image
# Manually trigger the workflow
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the code
- name: Checkout code
uses: actions/checkout@v3
# Step 2: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# Step 3: Log in to GitHub Packages Docker registry
- name: Log in to GitHub Packages
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
# Step 4: Build the Docker image
- name: Build Docker image
run: docker build . -t ghcr.io/${{ github.repository_owner }}/m3u-playlist-proxy:latest
# Step 5: Push the Docker image to GitHub Packages
- name: Push Docker image
run: docker push ghcr.io/${{ github.repository_owner }}/m3u-playlist-proxy:latest