1
1
mirror of https://github.com/orhun/git-cliff.git synced 2024-12-16 02:45:17 +03:00
git-cliff/.github/workflows/docker.yml

48 lines
1.2 KiB
YAML
Raw Normal View History

name: Docker Automated Builds
2021-06-11 21:41:03 +03:00
on:
push:
branches:
- main
jobs:
docker-hub:
name: Docker Hub
runs-on: ubuntu-20.04
2021-06-11 21:41:03 +03:00
steps:
2021-06-15 00:51:32 +03:00
- name: Checkout
uses: actions/checkout@v2
- name: Set up Docker Buildx
id: 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: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
context: ./
file: ./Dockerfile
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/git-cliff:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}