Skip to content

chore: add permissions #1

chore: add permissions

chore: add permissions #1

Workflow file for this run

name: Build & Publish to Registry

Check failure on line 1 in .github/workflows/docker-build.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/docker-build.yaml

Invalid workflow file

No steps defined in `steps` and no workflow called in `uses` for the following jobs: docker-build
on:
workflow_call:
inputs:
### Values from CICD Workflow ###
REGISTRY:
required: true
type: string
description: 'The Environemnt which should be used.'
ORGANISATION_NAME:
type: string
required: true
description: 'The Subscription ID which should be used.'
env:
IMAGE: '${{ inputs.REGISTRY }}/${{ inputs.ORGANISATION_NAME }}/gh-runner'
jobs:
docker-build:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/[email protected]
- name: Login to GitHub Container Registry
uses: docker/[email protected]
with:
registry: ${{ inputs.REGISTRY }}
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Docker meta
id: meta
uses: docker/[email protected]
with:
images: |
${{ env.IMAGE }}
tags: |
type=raw,latest
type=sha,prefix=,suffix=,short=true
- name: Build and push the fred version of the WebApp
uses: docker/[email protected]
with:
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64
push: true
context: ./gh-runner
file: ./gh-runner/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
- name: Display image tag in summary
run: |
echo "### Build & release! :rocket:" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "Released image:" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "- ${{steps.meta.outputs.tags}}" >> $GITHUB_STEP_SUMMARY