Skip to content

feat: added sccache to workflow and dockerfile (#12) #1

feat: added sccache to workflow and dockerfile (#12)

feat: added sccache to workflow and dockerfile (#12) #1

Workflow file for this run

name: Build and push Docker image
on:
push:
branches: main
jobs:
build-n-push:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: commit
uses: prompt/actions-commit-hash@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker Login
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
build-args: |
AWS_ACCESS_KEY_ID="${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY="${{ secrets.AWS_SECRET_ACCESS_KEY }}"
SCCACHE_BUCKET="agicommies-subspace-cache"
SCCACHE_ENDPOINT="${{ vars.SCCACHE_ENDPOINT }}"
SCCACHE_REGION="auto"
push: true
tags: ghcr.io/agicommies/subspace:${{ steps.commit.outputs.short }}