Skip to content

update to push to GCHR #4

update to push to GCHR

update to push to GCHR #4

Workflow file for this run

name: Build and publish to GHCR
on:
workflow_call:
inputs:
image_base_name:
required: true
type: string
docker_file:
required: false
type: string
default: Dockerfile
tag_value:
required: true
type: string
checkout_submodules:
type: boolean
required: false
default: false
jobs:
push-docker:
name: Push Docker Image to GHCR @ ${{ inputs.tag_value }}
runs-on: ubuntu-latest
steps:
upadte-gchr
- name: Checkout Repository

Check failure on line 27 in .github/workflows/push-docker.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/push-docker.yml

Invalid workflow file

You have an error in your yaml syntax on line 27
- name: Echo Deprecation Warning
run: |
echo "::warning Deprecated action. Migrate to branch_ci.yml and tagged_ci.yml"
- name: Checkout
main
uses: actions/checkout@v2
with:
ref: main
submodules: ${{ inputs.checkout_submodules }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Generate Docker Image Metadata
id: meta
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/openclimatefix/${{ inputs.image_base_name }}
tags: |
type=raw,value=${{ inputs.tag_value }}
flavor: latest=true
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v2
with:
context: .
file: ${{ inputs.docker_file }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}