aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Helmert III <ajak@gentoo.org>2024-02-07 20:34:52 -0800
committerJohn Helmert III <ajak@gentoo.org>2024-02-07 20:48:02 -0800
commit9b60a58e6b78d12d82afe857b8bb9649176542b8 (patch)
tree73e068bd46172bb67b2bab64e82aee59dcb57c23
parentDockerfiles: use modern Alpine (3.11->3.19) for builds (diff)
downloaddocker-images-9b60a58e6b78d12d82afe857b8bb9649176542b8.tar.gz
docker-images-9b60a58e6b78d12d82afe857b8bb9649176542b8.tar.bz2
docker-images-9b60a58e6b78d12d82afe857b8bb9649176542b8.zip
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@gentoo.org>
-rw-r--r--.github/actions/container_build/action.yml8
1 files 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