* [gentoo-commits] proj/docker-images:master commit in: .github/actions/container_build/
@ 2024-02-08 5:22 John Helmert III
0 siblings, 0 replies; 2+ messages in thread
From: John Helmert III @ 2024-02-08 5:22 UTC (permalink / raw
To: gentoo-commits
commit: 6f21df87717f8a871b4ae292faff107bde9d214d
Author: John Helmert III <ajak <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 8 04:59:57 2024 +0000
Commit: John Helmert III <ajak <AT> gentoo <DOT> org>
CommitDate: Thu Feb 8 05:21:07 2024 +0000
URL: https://gitweb.gentoo.org/proj/docker-images.git/commit/?id=6f21df87
actions: limit pushes to master branch
We don't want these steps to run on branches in this repository, even
if they're in a pull request to the master branch. We only want pushes
to happen from the master branch.
Closes: !137
Signed-off-by: John Helmert III <ajak <AT> gentoo.org>
.github/actions/container_build/action.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/actions/container_build/action.yml b/.github/actions/container_build/action.yml
index f4f2378..fc2b9b9 100644
--- a/.github/actions/container_build/action.yml
+++ b/.github/actions/container_build/action.yml
@@ -35,14 +35,14 @@ runs:
- name: Login to DockerHub
uses: docker/login-action@v2
if: |
- github.repository_owner == 'gentoo' &&
+ github.ref_name == 'master' && github.repository_owner == 'gentoo' &&
(github.event_name == 'schedule' || github.event_name == 'push')
with:
username: ${{ inputs.dockerhub_username }}
password: ${{ inputs.dockerhub_password }}
- name: Push image
if: |
- github.repository_owner == 'gentoo' &&
+ github.ref_name == 'master' && github.repository_owner == 'gentoo' &&
(github.event_name == 'schedule' || github.event_name == 'push')
shell: bash
env:
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] proj/docker-images:master commit in: .github/actions/container_build/
@ 2024-02-08 5:22 John Helmert III
0 siblings, 0 replies; 2+ messages in thread
From: John Helmert III @ 2024-02-08 5:22 UTC (permalink / raw
To: gentoo-commits
commit: 9b60a58e6b78d12d82afe857b8bb9649176542b8
Author: John Helmert III <ajak <AT> gentoo <DOT> org>
AuthorDate: Thu Feb 8 04:34:52 2024 +0000
Commit: John Helmert III <ajak <AT> gentoo <DOT> org>
CommitDate: Thu Feb 8 04:48:02 2024 +0000
URL: https://gitweb.gentoo.org/proj/docker-images.git/commit/?id=9b60a58e
actions: also push to Dockerhub on push
Limiting Dockerhub pushes to "scheduled" Actions runs was intended to
prevent these bits from running in PRs, but we also want changes to be
applied for regular pushes to the repository, so we allow 'push'. To
avoid this failing in forks without the requisite secrets, we also
limit these to repositories in Gentoo's namespace.
Signed-off-by: John Helmert III <ajak <AT> gentoo.org>
.github/actions/container_build/action.yml | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/.github/actions/container_build/action.yml b/.github/actions/container_build/action.yml
index bef1441..f4f2378 100644
--- a/.github/actions/container_build/action.yml
+++ b/.github/actions/container_build/action.yml
@@ -34,12 +34,16 @@ runs:
run: docker run --rm "${ORG}/${TARGET/-/:}" emerge --info
- name: Login to DockerHub
uses: docker/login-action@v2
- if: github.event_name == 'schedule'
+ if: |
+ github.repository_owner == 'gentoo' &&
+ (github.event_name == 'schedule' || github.event_name == 'push')
with:
username: ${{ inputs.dockerhub_username }}
password: ${{ inputs.dockerhub_password }}
- name: Push image
- if: github.event_name == 'schedule'
+ if: |
+ github.repository_owner == 'gentoo' &&
+ (github.event_name == 'schedule' || github.event_name == 'push')
shell: bash
env:
DOCKER_CLI_EXPERIMENTAL: enabled
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-08 5:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-08 5:22 [gentoo-commits] proj/docker-images:master commit in: .github/actions/container_build/ John Helmert III
-- strict thread matches above, loose matches on Subject: below --
2024-02-08 5:22 John Helmert III
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox