Skip to content

Commit

Permalink
Revert "feat: Cache Docker layers and SSH keys in GitHub Actions work…
Browse files Browse the repository at this point in the history
…flow"

This reverts commit fecdab7.
  • Loading branch information
ikurotime committed May 10, 2024
1 parent fecdab7 commit ca5ea89
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
# <https://stackoverflow.com/a/70447517>
run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
Expand Down

0 comments on commit ca5ea89

Please sign in to comment.