@@ -2,18 +2,20 @@ name: Docker Image CI
22
33on :
44 push :
5- branches : [ "master" ]
5+ branches :
6+ - master
67
78jobs :
89 push_to_registry :
9- name : Build and Push Docker image to GitHub Container Registry
10+ name : Build and Push Docker Image to GitHub Container Registry
1011 runs-on : ubuntu-latest
1112 permissions :
1213 contents : read
1314 packages : write
1415
1516 steps :
16- - uses : actions/checkout@v4
17+ - name : Checkout code
18+ uses : actions/checkout@v4
1719
1820 - name : Get version from file
1921 id : get_version
@@ -24,23 +26,25 @@ jobs:
2426 uses : docker/metadata-action@v4
2527 with :
2628 images : ghcr.io/${{ github.repository }}
27-
29+
2830 - name : Create latest tag
2931 id : create_latest_tag
30- run : echo LATEST=latest >> $GITHUB_ENV
31-
32+ run : echo " LATEST=latest" >> $GITHUB_ENV
33+
3234 - name : Set repository name in lowercase
3335 id : set_lowercase_repo
3436 run : echo "repo_lowercase=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
3537
3638 - name : Build and push Docker image
3739 uses : mr-smithers-excellent/docker-build-push@v6
3840 with :
39- image : ghcr.io/naterfute/yt-dlf
41+ image : ghcr.io/${{ github.repository }} # Use the repository from the context
4042 registry : ghcr.io
4143 platform : linux/amd64,linux/arm64,linux/arm/v7
4244 username : ${{ secrets.GHCR_USERNAME }}
4345 password : ${{ secrets.GHCR_TOKEN }}
4446 tags : |
45- 2.0.7
47+ ${{ env.VERSION }} # Use the version from the environment variable
48+ latest # Add the latest tag
4649 labels : ${{ steps.meta.outputs.labels }}
50+
0 commit comments