Files
rust-ci-img/.gitea/workflows/release-image.yaml
Lauren Kaviak 044a111a68
Some checks failed
Continuous Releases / build (push) Failing after 39s
configure git & push changes
2026-03-20 02:03:03 -05:00

38 lines
1.6 KiB
YAML

on: [push]
name: Continuous Releases
env:
IMAGE_TAG: tea.werats.gay/${{ env.GITHUB_REPOSITORY }}
UBUNTU_VERSION: latest
VERSION_FRAGMENT: minor
CURRENT_VERSION: 0.0.0
jobs:
publish_image:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Read Current Version
run: echo "::set-env name=CURRENT_VERSION::$(cat version.txt)"
- name: Increment Semantic Version
uses: christian-draeger/increment-semantic-version@1.2.3
id: bump_version
with:
current-version: ${{ env.CURRENT_VERSION }}
version-fragment: ${{ env.VERSION_FRAGMENT }}
- run: echo "${{ steps.bump_version.outputs.next-version }}" > version.txt
- name: Read Current Version
run: echo "::set-env name=CURRENT_VERSION::$(cat version.txt)"
- run: git config --global user.name "Build Pipeline"
- run: git config --global user.email "noreply@example.com"
- run: git add version.txt && git commit -m "${{ env.VERSION_FRAGMENT }} version increment [skip actions]" && git tag ${{ env.CURRENT_VERSION }}
- run: git push
- run: mkdir -p /etc/secrets || true
- run: printf '%s' "${{ secrets.CI_ACCESS }}" > /etc/secrets/docker.txt
- run: docker login --username ${{ env.GITHUB_ACTOR }} --password-stdin tea.werats.gay < /etc/secrets/docker.txt
- run: docker build . -t ${{ env.IMAGE_NAME }}:latest -t ${{ env.IMAGE_NAME }}:${{ env.CURRENT_VERSION}} --build-arg UBUNTU_VERSION=${{ env.UBUNTU_VERSION }}
- run: docker push -a ${{ env.IMAGE_NAME }}:${{ env.CURRENT_VERSION}}