| 1 |
sysadm |
1.1 |
# This workflow uses actions that are not certified by GitHub.
|
| 2 |
|
|
# They are provided by a third-party and are governed by
|
| 3 |
|
|
# separate terms of service, privacy policy, and support
|
| 4 |
|
|
# documentation.
|
| 5 |
|
|
|
| 6 |
|
|
# GitHub recommends pinning actions to a commit SHA.
|
| 7 |
|
|
# To get a newer version, you will need to update the SHA.
|
| 8 |
|
|
# You can also reference a tag or branch, but the action may change without warning.
|
| 9 |
|
|
|
| 10 |
|
|
name: Publish Docker image
|
| 11 |
|
|
|
| 12 |
|
|
on:
|
| 13 |
|
|
release:
|
| 14 |
|
|
types: [published]
|
| 15 |
|
|
|
| 16 |
|
|
env:
|
| 17 |
|
|
BBSD_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/lbbs-bbsd
|
| 18 |
|
|
|
| 19 |
|
|
jobs:
|
| 20 |
|
|
push_to_registry:
|
| 21 |
|
|
name: Push Docker image to Docker Hub
|
| 22 |
|
|
runs-on: ubuntu-latest
|
| 23 |
|
|
permissions:
|
| 24 |
|
|
packages: write
|
| 25 |
|
|
contents: read
|
| 26 |
|
|
attestations: write
|
| 27 |
|
|
id-token: write
|
| 28 |
|
|
steps:
|
| 29 |
|
|
- name: Check out the repo
|
| 30 |
|
|
uses: actions/checkout@v5
|
| 31 |
|
|
|
| 32 |
|
|
- name: Log in to Docker Hub
|
| 33 |
|
|
uses: docker/login-action@v3
|
| 34 |
|
|
with:
|
| 35 |
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
| 36 |
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
| 37 |
|
|
|
| 38 |
|
|
- name: Build and push Docker image
|
| 39 |
|
|
id: push-bbsd
|
| 40 |
|
|
uses: docker/build-push-action@v5
|
| 41 |
|
|
with:
|
| 42 |
|
|
context: .
|
| 43 |
|
|
file: ./Dockerfile/dockerfile.bbsd
|
| 44 |
|
|
push: true
|
| 45 |
|
|
tags: |
|
| 46 |
|
|
${{ env.BBSD_IMAGE }}:${{ github.ref_name }}
|
| 47 |
|
|
${{ env.BBSD_IMAGE }}:latest
|
| 48 |
|
|
labels: ${{ steps.meta.outputs.labels }}
|