Skip to content

Update docker-publish.yml #1

Update docker-publish.yml

Update docker-publish.yml #1

name: Docker
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
push:
pull_request:
schedule:
- cron: '16 6 * * *'
env:
IMAGE_NAME: sharmasecureservicesusa/plexrclone
TEST_TAG: ${{ env.IMAGE_NAME }}:test

Check failure on line 18 in .github/workflows/docker-publish.yml

View workflow run for this annotation

GitHub Actions / Docker

Invalid workflow file

The workflow is not valid. .github/workflows/docker-publish.yml (Line: 18, Col: 13): Unrecognized named-value: 'env'. Located at position 1 within expression: env.IMAGE_NAME .github/workflows/docker-publish.yml (Line: 19, Col: 15): Unrecognized named-value: 'env'. Located at position 1 within expression: env.IMAGE_NAME
LATEST_TAG: ${{ env.IMAGE_NAME }}:latest
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE_NAME }}
env:
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
- name: Build and export to Docker
uses: docker/build-push-action@v6
with:
load: true
tags: ${{ env.TEST_TAG }}
- name: Test
run: |
docker run --rm ${{ env.TEST_TAG }}
- name: Build and push
uses: docker/build-push-action@v6
with:
tags: ${{ steps.meta.outputs.tags }}
annotations: ${{ steps.meta.outputs.annotations }}
push: true