From dcb85589bfeeb6e53555df123cfd5f84247dfbb1 Mon Sep 17 00:00:00 2001 From: liushuyu Date: Mon, 13 Sep 2021 17:55:29 -0600 Subject: [PATCH] CI: push images to Docker Hub ... ... if the CI is running for `master` branch and current repo is `citra-emu/build-environments` --- .github/workflows/ci.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ce97d65..97428ca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,9 +16,15 @@ jobs: - uses: actions/checkout@v2 - uses: docker/setup-buildx-action@v1 name: Setup Docker BuildX system + - name: Login to DockerHub + uses: docker/login-action@v1 + if: (github.ref == 'refs/heads/master') && (github.repository == 'citra-emu/build-environments') + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} - uses: docker/build-push-action@v2 name: Build image with: - push: false + push: ${{ (github.ref == 'refs/heads/master') && (github.repository == 'citra-emu/build-environments') }} context: ${{ matrix.image }} tags: citraemu/build-environments:${{ matrix.image }}