File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11name : Push Placeholder Image
22
3+ permissions :
4+ contents : read
5+ packages : write
6+
37on :
48 workflow_dispatch :
59 inputs :
610 image_name :
7- description : ' target image name (zenfyrdev/ xpost)'
11+ description : ' target image name (xpost)'
812 required : true
913 type : string
1014
1115jobs :
1216 push-image :
1317 runs-on : ubuntu-latest
1418 steps :
15- - name : Log in to Docker Hub
19+ - name : Log in to GHCR
1620 uses : docker/login-action@v3
1721 with :
18- username : ${{ secrets.DOCKERHUB_USERNAME }}
19- password : ${{ secrets.DOCKERHUB_TOKEN }}
22+ registry : ghcr.io
23+ username : ${{ github.actor }}
24+ password : ${{ secrets.GITHUB_TOKEN }}
2025
2126 - name : Create and Push Placeholder
2227 run : |
2328 echo "FROM scratch" > Dockerfile
2429 echo "LABEL placeholder=true" >> Dockerfile
2530
26- docker build -t ${{ github.event.inputs.image_name }}:latest .
27- docker push ${{ github.event.inputs.image_name }}:latest
31+ docker build -t ghcr.io/zenfyrdev/ ${{ github.event.inputs.image_name }}:latest .
32+ docker push ghcr.io/zenfyrdev/ ${{ github.event.inputs.image_name }}:latest
You can’t perform that action at this time.
0 commit comments