Skip to content

update gh actions docker build #34

update gh actions docker build

update gh actions docker build #34

name: Docker Image CI
on:
push:
branches:
- '**'
tags:
- 'v*'
workflow_dispatch:
env:
REGISTRY: ghcr.io
jobs:
build-and-push-app:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/pastvu/fileserver
- name: Login to ghcr.io
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
push: true
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}