35 lines
859 B
YAML
35 lines
859 B
YAML
name: Docker image build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
SQLX_OFFLINE: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
-
|
|
name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
-
|
|
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: Build and push Docker images
|
|
uses: docker/build-push-action@v1
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
repository: modrinth/labrinth
|
|
tag_with_ref: false
|
|
tags: master
|
|
tag_with_sha: true |