From 1fd04ca947b393070c0162abe79490bd963e1b8f Mon Sep 17 00:00:00 2001 From: Markos Gogoulos Date: Wed, 28 Jun 2023 15:32:32 +0300 Subject: [PATCH] pass secrets to workflow --- .github/workflows/ci.yml | 1 + .github/workflows/docker-build-push.yml | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6b4367..5ea720e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,5 +15,6 @@ jobs: needs: [pre-commit] release: uses: ./.github/workflows/docker-build-push.yml + secrets: inherit # pass all secrets needs: [test] if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request' diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index b94dca6..3474d75 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -36,10 +36,11 @@ jobs: org.opencontainers.image.url=https://mediacms.io/ org.opencontainers.image.source=https://github.com/mediacms-io/mediacms org.opencontainers.image.licenses=AGPL-3.0 + - name: Login to Docker Hub uses: docker/login-action@v2.2.0 with: - username: mediacms + username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Build and push