Skip to content

current video in playlist #9

current video in playlist

current video in playlist #9

name: Docker Image CI
on:
push:
branches: [main] # Trigger on pushes to the main branch
pull_request:
branches: [main] # Trigger on pull requests targeting the main branch
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker Image
run: |
docker build -t ${{ github.repository }}:${{ github.sha }} -t ${{ github.repository }}:latest .
docker images ls
- name: Push Docker Image
run: |
docker push ${{ github.repository }}:${{ github.sha }}
docker push ${{ github.repository }}:latest