Skip to content
<<<<<<< HEAD
name: 'Containers: Publish'

Check failure on line 2 in .github/workflows/containers-publish.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/containers-publish.yml

Invalid workflow file

You have an error in your yaml syntax on line 2
on:
push:
tags: [ 'v*' ]
=======
name: "Containers: Publish"
on:
push:
tags: ["v*"]
>>>>>>> afb000d3a3ee90a677a2580d82fe3a432d1c1933
permissions:
packages: write
jobs:
release-containers:
name: Build and Push
runs-on: ubuntu-latest
steps:
<<<<<<< HEAD
- uses: actions/checkout@v3
- name: Login to ghcr.io Docker registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Compute Docker container image addresses
run: |
DOCKER_REPOSITORY="ghcr.io/${GITHUB_REPOSITORY,,}"
DOCKER_TAG="${GITHUB_REF:11}"
echo "DOCKER_REPOSITORY=${DOCKER_REPOSITORY}" >> $GITHUB_ENV
echo "DOCKER_TAG=${DOCKER_TAG}" >> $GITHUB_ENV
echo "Using: ${DOCKER_REPOSITORY}/*:${DOCKER_TAG}"
# - name: 'Pull previous Docker container image: :latest'
# run: docker pull "${DOCKER_REPOSITORY}:latest" || true
- name: 'Pull previous Docker container image: frontend-static:latest'
run: docker pull "${DOCKER_REPOSITORY}/frontend-static:latest" || true
- name: 'Build Docker container image: frontend-static:latest'
run: |
docker build \
--cache-from "${DOCKER_REPOSITORY}/frontend-static:latest" \
--file frontend/Dockerfile.demo \
--build-arg SERVER_NAME=localhost \
--tag "${DOCKER_REPOSITORY}/frontend-static:latest" \
--tag "${DOCKER_REPOSITORY}/frontend-static:${DOCKER_TAG}" \
frontend
- name: 'Push Docker container image frontend-static:latest'
run: docker push "${DOCKER_REPOSITORY}/frontend-static:latest"
- name: 'Push Docker container image frontend-static:v*'
run: docker push "${DOCKER_REPOSITORY}/frontend-static:${DOCKER_TAG}"
=======
- uses: actions/checkout@v3
- name: Login to ghcr.io Docker registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Compute Docker container image addresses
run: |
DOCKER_REPOSITORY="ghcr.io/${GITHUB_REPOSITORY,,}"
DOCKER_TAG="${GITHUB_REF:11}"
echo "DOCKER_REPOSITORY=${DOCKER_REPOSITORY}" >> $GITHUB_ENV
echo "DOCKER_TAG=${DOCKER_TAG}" >> $GITHUB_ENV
echo "Using: ${DOCKER_REPOSITORY}/*:${DOCKER_TAG}"
# - name: 'Pull previous Docker container image: :latest'
# run: docker pull "${DOCKER_REPOSITORY}:latest" || true
- name: "Pull previous Docker container image: frontend-static:latest"
run: docker pull "${DOCKER_REPOSITORY}/frontend-static:latest" || true
- name: "Build Docker container image: frontend-static:latest"
run: |
docker build \
--cache-from "${DOCKER_REPOSITORY}/frontend-static:latest" \
--file frontend/Dockerfile.demo \
--build-arg SERVER_NAME=localhost \
--tag "${DOCKER_REPOSITORY}/frontend-static:latest" \
--tag "${DOCKER_REPOSITORY}/frontend-static:${DOCKER_TAG}" \
frontend
- name: "Push Docker container image frontend-static:latest"
run: docker push "${DOCKER_REPOSITORY}/frontend-static:latest"
- name: "Push Docker container image frontend-static:v*"
run: docker push "${DOCKER_REPOSITORY}/frontend-static:${DOCKER_TAG}"
>>>>>>> afb000d3a3ee90a677a2580d82fe3a432d1c1933
#
#
# - name: 'Build Docker container image: backend:latest'
# run: |
# cd backend && \
# make && \
# docker image tag "${DOCKER_REPOSITORY}/backend/local:latest" "${DOCKER_REPOSITORY}/backend:latest"
#
# - name: Push Docker container image backend:latest
# run: docker push "${DOCKER_REPOSITORY}/backend:latest"
#
# - name: Push Docker container image backend:v*
# run: docker push "${DOCKER_REPOSITORY}/backend:${DOCKER_TAG}"
<<<<<<< HEAD
# - name: Push Docker container image :v*"
# run: docker push "${DOCKER_REPOSITORY}:${DOCKER_TAG}"
=======
# - name: Push Docker container image :v*"
# run: docker push "${DOCKER_REPOSITORY}:${DOCKER_TAG}"
>>>>>>> afb000d3a3ee90a677a2580d82fe3a432d1c1933