Fix cache sharing between frontend and backend #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Publish quick-setup image to ghcr.io" | |
on: | |
push: | |
branches: [master] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set environment variables | |
run: | | |
cat >> "$GITHUB_ENV" <<EOF | |
latest=ghcr.io/${{ github.repository }}-dev:latest | |
current=ghcr.io/${{ github.repository }}-dev:$(git rev-parse --short ${{ github.sha }}) | |
EOF | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log in to ghcr.io | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
build-args: RAZZLE_TAITAN_URL=http://localhost:5000 | |
push: true | |
tags: ${{ env.latest }},${{ env.current }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |