Skip to content

Merge pull request #22 from onitamasuperfan/master #68

Merge pull request #22 from onitamasuperfan/master

Merge pull request #22 from onitamasuperfan/master #68

Workflow file for this run

name: Docker Image CI
on:
push:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- 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 GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ghcr.io/${{ github.repository_owner }}/onitama:${{ github.ref_name || 'master' }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
"BUILD_VERSION=${{ github.ref_name || 'master' }}"