copy over the workflow for building and publishing the image
All checks were successful
Continuous Releases / build (push) Successful in 1m4s
All checks were successful
Continuous Releases / build (push) Successful in 1m4s
This commit is contained in:
37
.gitea/workflows/release-image.yml
Normal file
37
.gitea/workflows/release-image.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
on: [push]
|
||||
|
||||
name: Continuous Releases
|
||||
|
||||
env:
|
||||
IMAGE_NAME: tea.werats.gay/${{ 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: 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 }} && git push && git push --tags
|
||||
1
version.txt
Normal file
1
version.txt
Normal file
@@ -0,0 +1 @@
|
||||
0.0.1
|
||||
Reference in New Issue
Block a user