Skip to content

Push Placeholder Image #3

Push Placeholder Image

Push Placeholder Image #3

Workflow file for this run

name: Push Placeholder Image
permissions:
contents: read
packages: write
on:
workflow_dispatch:
inputs:
image_name:
description: 'target image name (xpost)'
required: true
type: string
jobs:
push-image:
runs-on: ubuntu-latest
steps:
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create Placeholder
run: |
echo "FROM scratch" > Dockerfile
echo "LABEL placeholder=true" >> Dockerfile
- name: Build and push dummy image
uses: docker/build-push-action@v4
with:
context: .
file: ./Dockerfile
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/${{ github.event.inputs.image_name }}:latest