Skip to content

Merge pull request #11 from icefoganalytics/main #11

Merge pull request #11 from icefoganalytics/main

Merge pull request #11 from icefoganalytics/main #11

name: Build and Push
on:
push:
branches: [main, test]
env:
REGISTRY: ghcr.io
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Generate release tag
id: generate_release_tag
uses: amitsingh-007/next-release-tag@v5.1.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
tag_prefix: "v"
tag_template: "yyyy.mm.dd.i"
- name: Build and push Docker image
uses: docker/build-push-action@v5.3.0
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}:${{ steps.generate_release_tag.outputs.next_release_tag }}
- name: Create release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.generate_release_tag.outputs.next_release_tag }}