Skip to content

Commit 9bd8974

Browse files
committed
Set PR runs
1 parent 077cb81 commit 9bd8974

3 files changed

Lines changed: 44 additions & 1 deletion

File tree

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Docker Publish (Production Images)
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
types: [opened, synchronize, reopened]
7+
paths:
8+
- src/**
9+
- .github/workflows/**
10+
- github-cli-build-version.txt
11+
12+
jobs:
13+
build-production-images:
14+
uses: ./.github/workflows/service_docker-build-and-publish.yml
15+
secrets: inherit
16+
with:
17+
release_type: 'latest'
18+
push: false
19+
update_container_readme:
20+
runs-on: ubuntu-24.04
21+
name: Push README to Docker Hub
22+
steps:
23+
- name: git checkout
24+
uses: actions/checkout@v4
25+
with:
26+
ref: main
27+
28+
- name: push README to Dockerhub
29+
uses: christian-korneck/update-container-description-action@v1
30+
env:
31+
DOCKER_USER: ${{ secrets.DOCKER_HUB_README_USERNAME }}
32+
DOCKER_PASS: ${{ secrets.DOCKER_HUB_README_PASSWORD }}
33+
with:
34+
destination_container_repo: serversideup/github-cli
35+
provider: dockerhub
36+
short_description: 'Run GitHub CLI anywhere with a lightwieght and powerful Docker image.'
37+
readme_file: 'README.md'

.github/workflows/action_publish-images-production.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
secrets: inherit
1717
with:
1818
release_type: 'latest'
19+
push: true
1920

2021
update_container_readme:
2122
runs-on: ubuntu-24.04

.github/workflows/service_docker-build-and-publish.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
required: true
99
description: 'Release type (latest, beta, edge, dev, etc)'
1010
default: 'edge'
11+
push:
12+
type: boolean
13+
required: true
14+
description: 'Push to Docker Hub and GitHub Container Registry'
15+
default: true
1116

1217
jobs:
1318
build-and-push:
@@ -99,6 +104,6 @@ jobs:
99104
linux/amd64
100105
linux/arm64/v8
101106
pull: true
102-
push: true
107+
push: ${{ inputs.push }}
103108
tags: ${{ env.DOCKER_TAGS }}
104109
outputs: type=image,name=target,annotation-index.org.opencontainers.image.description=Run GitHub CLI anywhere with the power of Docker

0 commit comments

Comments
 (0)