Cache ALL the things (#60) #43
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: Build and push dev image | |
on: | |
push: | |
branches: | |
- 'master' | |
- 'dev' | |
jobs: | |
build-push-dev: | |
container: | |
image: ghcr.io/lolibrary/builder | |
credentials: | |
username: ${{ github.actor }} | |
password: ${{ secrets.PAT }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout build tools | |
uses: actions/checkout@v2 | |
with: | |
repository: lolibrary/build | |
token: ${{ secrets.PAT }} | |
- name: Checkout Sakura | |
uses: actions/checkout@v2 | |
with: | |
path: cache | |
- name: GHCR login | |
uses: docker/login-action@v1 | |
with: | |
username: ${{ github.actor }} | |
password: ${{ secrets.PAT }} | |
registry: ghcr.io | |
- name: Move fontfiles | |
run: cp fortawesome* cache/ | |
- name: Docker Build & Push | |
run: | | |
docker build -t $DOCKER_SHA_TAG -t $DOCKER_LATEST_TAG --build-arg NOVA_USERNAME=${{ secrets.NOVA_USERNAME }} --build-arg NOVA_API_KEY=${{ secrets.NOVA_API_KEY }} -f cache/dev-dockerfile ./cache/ | |
docker push $DOCKER_SHA_TAG | |
docker push $DOCKER_LATEST_TAG | |
env: | |
DOCKER_SHA_TAG: "ghcr.io/lolibrary/sakura-dev:${{ github.sha }}" | |
DOCKER_LATEST_TAG: "ghcr.io/lolibrary/sakura-dev:latest" | |