2023-11-27 19:00:17 +00:00
|
|
|
on: [push]
|
2023-08-17 19:25:57 +00:00
|
|
|
env:
|
|
|
|
REVISION: ${{ github.sha }}
|
2023-12-09 17:17:08 +00:00
|
|
|
IMAGE_TAG: varakh/hetzner-storagebox-exporter
|
2023-08-17 19:25:57 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: docker
|
|
|
|
container:
|
|
|
|
image: alpine:3.18
|
|
|
|
steps:
|
2023-11-27 19:00:17 +00:00
|
|
|
- name: Prepare requirements
|
|
|
|
run: |
|
|
|
|
apk add --no-cache nodejs npm git
|
|
|
|
apk add --no-cache docker docker-cli-buildx
|
2023-08-17 19:25:57 +00:00
|
|
|
|
2023-11-27 19:00:17 +00:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
name: Clone
|
2023-08-17 19:25:57 +00:00
|
|
|
|
2023-11-27 19:00:17 +00:00
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v2
|
2023-08-17 19:25:57 +00:00
|
|
|
|
2023-11-27 19:00:17 +00:00
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v2
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USER }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_KEY }}
|
2023-08-17 19:25:57 +00:00
|
|
|
|
2023-11-27 19:00:17 +00:00
|
|
|
- name: Build docker image
|
|
|
|
uses: docker/build-push-action@v4
|
|
|
|
with:
|
|
|
|
push: false
|
2023-12-09 17:17:08 +00:00
|
|
|
tags: |
|
|
|
|
${{ env.IMAGE_TAG }}:${{ github.sha }}
|