Skip to content

Merge pull request #178 from takonomura/cache-extracted #243

Merge pull request #178 from takonomura/cache-extracted

Merge pull request #178 from takonomura/cache-extracted #243

name: Build Docker image (sha)
on:
push:
branches:
- "**"
jobs:
docker-build-sha:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v1
- uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/metadata-action@v3
id: meta
with:
images: ghcr.io/whywaita/myshoes
tags: |
type=sha
- name: Build container image
uses: docker/build-push-action@v2
with:
push: true
tags: ${{ steps.meta.outputs.tags }}