This commit is contained in:
@@ -3,8 +3,10 @@ on: [push]
|
|||||||
name: Continuous Releases
|
name: Continuous Releases
|
||||||
|
|
||||||
env:
|
env:
|
||||||
IMAGE_TAG: tea.werats.gay/laurayka/ci-rust-img:latest
|
IMAGE_TAG: tea.werats.gay/${{ env.GITHUB_REPOSITORY }}
|
||||||
UBUNTU_VERSION: latest
|
UBUNTU_VERSION: latest
|
||||||
|
VERSION_FRAGMENT: minor
|
||||||
|
CURRENT_VERSION: 0.0.0
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish_image:
|
publish_image:
|
||||||
@@ -14,8 +16,20 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
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 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: mkdir -p /etc/secrets || true
|
||||||
- run: printf '%s' "${{ secrets.CI_ACCESS }}" > /etc/secrets/docker.txt
|
- 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 login --username ${{ env.GITHUB_ACTOR }} --password-stdin tea.werats.gay < /etc/secrets/docker.txt
|
||||||
- run: docker build . -t ${{ env.IMAGE_TAG }} --build-arg UBUNTU_VERSION=${{ env.UBUNTU_VERSION }}
|
- 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 ${{ env.IMAGE_TAG }}
|
- run: docker push -a ${{ env.IMAGE_NAME }}:${{ env.CURRENT_VERSION}}
|
||||||
1
version.txt
Normal file
1
version.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
0.0.0
|
||||||
Reference in New Issue
Block a user