Skip to content

Commit 71c444a

Browse files
committed
Update empty.yml
1 parent 5c0ae39 commit 71c444a

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

.github/workflows/empty.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
name: Push Placeholder Image
22

3+
permissions:
4+
contents: read
5+
packages: write
6+
37
on:
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

1115
jobs:
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

0 commit comments

Comments
 (0)