Skip to content

feat: add GitHub actions #1

feat: add GitHub actions

feat: add GitHub actions #1

Workflow file for this run

name: Build and Push Image
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Determine Metadata
id: metadata
run: |
echo "::set-output name=version::$(cat package.json | jq -r .version)"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ github.repository_owner }}/srf-meteo-exporter:${{ steps.metadata.outputs.version }},${{ github.repository_owner }}/srf-meteo-exporter:latest