Skip to content

Commit 2052dac

Browse files
Publish image to ghcr and use in action (#1)
1 parent 4ef2edd commit 2052dac

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: publish
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
build-only:
6+
required: true
7+
description: Only Build Image, skip publishing
8+
type: boolean
9+
default: false
10+
jobs:
11+
publish-mwcs-deploy-image:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- name: Login to GitHub Container Registry
16+
uses: docker/login-action@v1
17+
with:
18+
registry: ghcr.io
19+
username: ${{ github.actor }}
20+
password: ${{ secrets.GITHUB_TOKEN }}
21+
- name: Only Build MWCS Deploy
22+
if: ${{input.build-only == true}}
23+
run: |
24+
docker build . --tag ghcr.io/godaddy-wordpress/mwcs-deploy:latest
25+
- name: Build the MWCS Deploy Docker image and Publish
26+
if: ${{input.build-only == false}}
27+
run: |
28+
docker build . --tag ghcr.io/godaddy-wordpress/mwcs-deploy:latest
29+
docker push ghcr.io/godaddy-wordpress/mwcs-deploy:latest

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ inputs:
2020
required: false
2121
runs:
2222
using: 'docker'
23-
image: 'docker://godaddy-wordpress/mwcs-deploy:1'
23+
image: 'ghcr.io/godaddy-wordpress/mwcs-deploy:latest'

0 commit comments

Comments
 (0)