Skip to content

_cargo/config: enable sparse-registry #79

_cargo/config: enable sparse-registry

_cargo/config: enable sparse-registry #79

Workflow file for this run

name: Build and push docker image
on:
push:
branches:
- master
- testing
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
distro: ["", ".ubuntu"]
steps:
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
# list of Docker images to use as base name for tags
images: |
yousong/dconf
ghcr.io/yousong/dconf
# generate Docker tags based on the following events/attributes
tags: |
type=raw,value={{date 'YYYYMMDD'}}${{ matrix.distro }},enable=${{ github.ref == 'refs/heads/master' }}
type=raw,value=latest${{ matrix.distro }},enable=${{ github.ref == 'refs/heads/master' }}
type=raw,value=testing${{ matrix.distro }},enable=${{ github.ref == 'refs/heads/testing' }}
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to ghcr.io
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
file: Dockerfile${{ matrix.distro }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}