Merge pull request #549 from aneoconsulting/esoubiran-aneo-patch-1 #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CD Docker | |
on: | |
push: | |
branches: | |
- 'main' | |
tags: | |
- '*' | |
permissions: | |
contents: write | |
jobs: | |
docker: | |
if: github.repository == 'aneoconsulting/ArmoniK.Admin.GUI' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3 | |
with: | |
fetch-depth: 0 | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@818d4b7b91585d195f67373fd9cb0332e31a7175 # v4 | |
with: | |
# list of Docker images to use as base name for tags | |
images: | | |
dockerhubaneo/armonik_admin_app | |
# generate Docker tags based on the following events/attributes | |
tags: | | |
type=edge,branch=main | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
type=sha | |
- name: Login to DockerHub | |
uses: docker/login-action@465a07811f14bebb1938fbed4728c6a1ff8901fc # v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USER }} | |
password: ${{ secrets.DOCKER_HUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@2eb1c1961a95fc15694676618e422e8ba1d63825 # v4 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
file: ./Dockerfile | |
- run: npx changelogithub | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |