Skip to content

init github-action

init github-action #6

name: "Build and Push Docker-Images"
on:
push:
branches: [ "master" ]
jobs:
# Frontend:
# name: Push Frontend Image
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
Backend:
name: Push Backend Image
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ccm-mgmt/backend
- name: Build and Push
uses: docker/build-push-action@v3
with:
context: .
file: docker/backend/Dockerfile
push: true
tags: ccm-mgmt/backend:${{ GITHUB_REF }}

Check failure on line 37 in .github/workflows/build_and_push_docker_images.yml

View workflow run for this annotation

GitHub Actions / Build and Push Docker-Images

Invalid workflow file

The workflow is not valid. .github/workflows/build_and_push_docker_images.yml (Line: 37, Col: 17): Unrecognized named-value: 'GITHUB_REF'. Located at position 1 within expression: GITHUB_REF