Skip to content

Centralize Docker build cache (#174) #103

Centralize Docker build cache (#174)

Centralize Docker build cache (#174) #103

Workflow file for this run

name: Release
on:
push:
branches:
- main
jobs:
Bundle:
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, '#major') || contains(github.event.head_commit.message, '#minor') || contains(github.event.head_commit.message, '#patch')
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Prepare for bundling
run: |
mkdir -p rodhaj-docker
mkdir -p releases
cp docker/docker-compose.yml rodhaj-docker/
cp docker/example.env rodhaj-docker/
cp -r docker/pg/ rodhaj-docker/
- name: Bundle docker-related files
run: |
zip releases/rodhaj-docker.zip rodhaj-docker/**
tar -czf releases/rodhaj-docker.tar.gz rodhaj-docker/**
- name: Upload bundle
uses: actions/upload-artifact@v4
with:
path: releases
Release:
permissions:
contents: write
needs: Bundle
runs-on: ubuntu-latest
if: contains(github.event.head_commit.message, '#major') || contains(github.event.head_commit.message, '#minor') || contains(github.event.head_commit.message, '#patch')
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: artifact
path: releases
- name: Bump version and push tag
uses: anothrNick/[email protected]
id: tag_version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
RELEASE_BRANCHES: main
- name: Release New Version
uses: ncipollo/release-action@v1
with:
body: "https://github.com/transprogrammer/rodhaj/compare/${{ steps.tag_version.outputs.tag }}...${{ steps.tag_version.outputs.new_tag }}"
token: ${{ secrets.PAT_TOKEN }}
tag: ${{ steps.tag_version.outputs.new_tag }}
name: ${{ steps.tag_version.outputs.new_tag }}
artifacts: "releases/rodhaj-docker.zip,releases/rodhaj-docker.tar.gz"