Skip to content

refactor INVIDIOUS_URL usage #10

refactor INVIDIOUS_URL usage

refactor INVIDIOUS_URL usage #10

Workflow file for this run

name: Build and Publish Docker Image to ghcr.io
on:
push:
branches: ['main']
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to ghcr.io
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d_%H-%M-%S')"
- name: Build Image
run: docker build . --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.date.outputs.date }}
- name: Publish Date Image
run: docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.date.outputs.date }}
- name: Tag and Publish Latest Image
run: |
docker tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.date.outputs.date }} ghcr.io/juandjara/freetunes:latest
docker push ghcr.io/juandjara/freetunes:latest