2023-08-17 19:25:57 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
env:
|
|
|
|
REVISION: ${{ github.sha }}
|
|
|
|
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: true
|
|
|
|
tags: varakh/hetzner-storagebox-exporter:latest
|