diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index fe3cfee53..ec1792b27 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -6,13 +6,15 @@ on: workflow_dispatch: release: - types: [released] + types: + - released jobs: docker-images: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - name: Checkout + uses: actions/checkout@v2 - name: Set up QEMU uses: docker/setup-qemu-action@v1 @@ -20,9 +22,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Run ./ci/steps/docker-buildx-push.sh run: ./ci/steps/docker-buildx-push.sh env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} - DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + GITHUB_TOKEN: ${{ github.token }} diff --git a/ci/steps/docker-buildx-push.sh b/ci/steps/docker-buildx-push.sh index 79b205580..75688cb56 100755 --- a/ci/steps/docker-buildx-push.sh +++ b/ci/steps/docker-buildx-push.sh @@ -26,11 +26,6 @@ main() { # Download the release-packages artifact download_artifact release-packages ./release-packages - # Login to Docker - if [[ ${CI-} ]]; then - echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin - fi - docker buildx bake -f ci/release-image/docker-bake.hcl --push }