0
Fork 0
mirror of https://github.com/willnorris/imageproxy.git synced 2025-01-06 22:40:34 -05:00
imageproxy/.github/workflows/docker.yml

41 lines
917 B
YAML
Raw Normal View History

on:
push:
2021-10-12 22:48:18 -05:00
branches:
- 'main'
tags:
- '*'
name: Publish Docker image
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
2021-10-12 22:39:23 -05:00
- uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 # v1.10.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
2021-10-12 22:39:23 -05:00
- uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
2021-10-12 22:39:23 -05:00
id: meta
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
2021-10-12 22:39:23 -05:00
- uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
2021-10-12 22:39:23 -05:00
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}