Skip to content

added latest tag

added latest tag #10

Workflow file for this run

# derived from https://docs.github.com/en/packages/managing-github-packages-using-github-actions-workflows/publishing-and-installing-a-package-with-github-actions
name: Create and publish Docker image
on:
push:
branches:
- master
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/tibber-pulse-reader
jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build with Maven
run: mvn --batch-mode --update-snapshots package
# - name: Upload jar to mega.nz
# uses: Difegue/action-megacmd@043c6d2a167af3ae0904fc88c6b2829e4140dc8d
# with:
# args: put target/tibber-pulse-reader-1.0.0-SNAPSHOT.jar /tibber-pulse-reader/tibber-pulse-reader.${{ github.ref_name }}.jar
# env:
# USERNAME: ${{ secrets.MEGA_USERNAME }}
# PASSWORD: ${{ secrets.MEGA_PASSWORD }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm64
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}, ${{ GITHUB_REPOSITORY }}:latest

Check failure on line 60 in .github/workflows/deploy-image.yml

View workflow run for this annotation

GitHub Actions / Create and publish Docker image

Invalid workflow file

The workflow is not valid. .github/workflows/deploy-image.yml (Line: 60, Col: 17): Unrecognized named-value: 'GITHUB_REPOSITORY'. Located at position 1 within expression: GITHUB_REPOSITORY
labels: ${{ steps.meta.outputs.labels }}
- name: Build and push Docker image for Alpine
uses: docker/build-push-action@v4
with:
platforms: linux/amd64
context: .
file: ./Dockerfile-Alpine
push: true
tags: ${{ steps.meta.outputs.tags }}-alpine
labels: ${{ steps.meta.outputs.labels }}