Skip to content

Commit 8c795e9

Browse files
Create push-test-image.yml
1 parent c38a60f commit 8c795e9

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Push test image to GHCR
2+
on:
3+
workflow_dispatch:
4+
5+
permissions:
6+
packages: write
7+
contents: read
8+
9+
jobs:
10+
push-image:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v5
14+
15+
- name: Log in to GitHub Container Registry
16+
uses: docker/login-action@v3
17+
with:
18+
registry: ghcr.io
19+
username: ${{ github.actor }}
20+
password: ${{ secrets.PAT_TOKEN }}
21+
22+
- name: Build and push image
23+
run: |
24+
IMAGE=ghcr.io/${{ github.repository_owner }}/workflow-playground:test
25+
docker build -t $IMAGE .
26+
docker push $IMAGE

0 commit comments

Comments
 (0)