diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 0ad9804..c2fce34 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -16,19 +16,15 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Cache Docker layers - uses: actions/cache@v2 - with: - path: /tmp/.buildx-cache - key: ${{ runner.os }}-buildx-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-buildx- + - name: Login + run: | + echo ${{ secrets.PAT }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin - name: Build and Publish run: | echo " " >> Cargo.toml echo [env] >> Cargo.toml echo DATABASE_URL = \"${{ secrets.DATABASE_URL }}\" >> Cargo.toml - docker build . --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} --cache-from=/tmp/.buildx-cache --cache-to=/tmp/.buildx-cache + docker build . --tag ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} deploy: @@ -37,14 +33,9 @@ jobs: runs-on: ubuntu-latest steps: - - name: Cache SSH keys - uses: actions/cache@v2 - with: - path: ~/.ssh - key: ${{ runner.os }}-ssh-${{ github.sha }} - restore-keys: | - ${{ runner.os }}-ssh- - name: install ssh keys + # check this thread to understand why its needed: + # run: | install -m 600 -D /dev/null ~/.ssh/id_rsa echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa