Skip to content

Commit 5c0ae39

Browse files
committed
test throwing an empty image from actions
1 parent 87649f0 commit 5c0ae39

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.github/workflows/empty.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Push Placeholder Image
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
image_name:
7+
description: 'target image name (zenfyrdev/xpost)'
8+
required: true
9+
type: string
10+
11+
jobs:
12+
push-image:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Log in to Docker Hub
16+
uses: docker/login-action@v3
17+
with:
18+
username: ${{ secrets.DOCKERHUB_USERNAME }}
19+
password: ${{ secrets.DOCKERHUB_TOKEN }}
20+
21+
- name: Create and Push Placeholder
22+
run: |
23+
echo "FROM scratch" > Dockerfile
24+
echo "LABEL placeholder=true" >> Dockerfile
25+
26+
docker build -t ${{ github.event.inputs.image_name }}:latest .
27+
docker push ${{ github.event.inputs.image_name }}:latest

0 commit comments

Comments
 (0)