2021-01-24 14:24:37 +00:00
|
|
|
name: Docker
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2024-05-02 14:22:04 +00:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
paths-ignore:
|
|
|
|
- web/**
|
|
|
|
- doc/**
|
|
|
|
|
|
|
|
pull_request:
|
2021-01-24 14:24:37 +00:00
|
|
|
branches:
|
|
|
|
- main
|
2023-03-04 17:11:04 +00:00
|
|
|
paths-ignore:
|
|
|
|
- web/**
|
|
|
|
- doc/**
|
2021-01-24 14:24:37 +00:00
|
|
|
|
|
|
|
# Publish `v1.2.3` tags as releases.
|
|
|
|
tags:
|
|
|
|
- v*
|
|
|
|
|
2022-10-13 20:32:01 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2021-01-24 14:24:37 +00:00
|
|
|
jobs:
|
2024-05-02 17:22:30 +00:00
|
|
|
docker-buildx:
|
2024-05-30 13:20:54 +00:00
|
|
|
env:
|
|
|
|
IMAGE_NAME: conky
|
|
|
|
DOCKER_BUILDKIT: 1
|
2024-06-04 18:00:29 +00:00
|
|
|
DOCKERHUB_USERNAME: brndnmtthws
|
|
|
|
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
|
2021-01-24 14:24:37 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2023-09-04 17:18:19 +00:00
|
|
|
uses: actions/checkout@v4
|
2021-01-24 14:24:37 +00:00
|
|
|
- name: Set up QEMU
|
2023-09-18 17:55:27 +00:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2021-01-24 14:24:37 +00:00
|
|
|
- name: Set up Docker Buildx
|
|
|
|
id: buildx
|
2023-09-18 17:55:23 +00:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2024-05-13 18:13:38 +00:00
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v3
|
2024-06-04 18:00:29 +00:00
|
|
|
if: ${{ env.DOCKERHUB_TOKEN != '' }}
|
2024-05-13 18:13:38 +00:00
|
|
|
with:
|
2024-06-04 18:13:30 +00:00
|
|
|
username: ${{ env.DOCKERHUB_USERNAME }}
|
2024-05-13 18:13:38 +00:00
|
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
2024-05-02 17:22:30 +00:00
|
|
|
- name: Build and push Docker image
|
|
|
|
env:
|
|
|
|
RELEASE: "${{ startsWith(github.ref, 'refs/tags/') && 'ON' || 'OFF' }}"
|
2024-05-02 18:54:11 +00:00
|
|
|
GITHUB_REF: ${{ github.ref }}
|
2024-06-04 18:00:29 +00:00
|
|
|
run: .github/scripts/docker-build.bash
|