2024-05-24 20:16:21 +00:00
|
|
|
name: ci
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- docker
|
2024-05-24 20:34:06 +00:00
|
|
|
tags:
|
|
|
|
- '*'
|
2024-05-24 20:16:21 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
docker-build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up QEMU
|
|
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
|
|
|
|
- name: Login to Forge Hub
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
with:
|
|
|
|
registry: forge.k3s.fr
|
|
|
|
username: ${{ secrets.FORGEHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.FORGEHUB_PASSWORD }}
|
2024-05-24 20:34:06 +00:00
|
|
|
- name: Extract metadata (tags, labels) for Forge hub
|
|
|
|
id: metaforge
|
|
|
|
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
|
|
|
|
with:
|
|
|
|
images: forge.k3s.fr/frank/opentsdb-auth-proxy
|
2024-05-24 20:16:21 +00:00
|
|
|
- name: Build and push
|
|
|
|
uses: docker/build-push-action@v5
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: true
|
2024-05-24 20:34:06 +00:00
|
|
|
tags: ${{ steps.metaforge.outputs.tags }}
|
2024-05-24 20:16:21 +00:00
|
|
|
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
|
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
2024-05-24 20:34:06 +00:00
|
|
|
- name: Extract metadata (tags, labels) for Forge hub
|
|
|
|
id: metadockerhub
|
|
|
|
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
|
|
|
|
with:
|
|
|
|
images: frankkkkk/opentsdb-auth-proxy
|
2024-05-24 20:16:21 +00:00
|
|
|
- name: Build and push
|
|
|
|
uses: docker/build-push-action@v5
|
|
|
|
with:
|
|
|
|
context: .
|
|
|
|
push: true
|
2024-05-24 20:34:06 +00:00
|
|
|
tags: ${{ steps.metadockerhub.outputs.tags }}
|