Skip to content

Support for tls connections #30

Support for tls connections

Support for tls connections #30

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
tags:
- v*
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@v2
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
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: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
file: Dockerfile
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}