Support for services with custom ids #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Push | |
on: [push] | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: ${{ github.repository }} | |
jobs: | |
build_and_push: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: login to registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: root | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: extract metadata | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
- name: build and push image to registry | |
uses: docker/build-push-action@v3 | |
with: | |
file: Dockerfile | |
context: . | |
cache-from: type=gha | |
pull: true | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} |