Skip to content

build(deps): bump amazoncorretto from 21.0.0 to 21.0.1 (#12) #10

build(deps): bump amazoncorretto from 21.0.0 to 21.0.1 (#12)

build(deps): bump amazoncorretto from 21.0.0 to 21.0.1 (#12) #10

Workflow file for this run

name: autotag
on:
push:
branches: [ main ]
jobs:
autotag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Required due to the way Git works, without it this action won't be able to find any or the correct tags
token: ${{ secrets.PAT }}
- name: Get previous tag
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
with:
fallback: v0.0.0 # Optional fallback tag to use when no tag can be found
prefix: v # Optional prefix to strip from the tag
- name: Read version from file
run: |
echo "previous_version=${{ steps.previoustag.outputs.tag }}" >> "$GITHUB_ENV"
CURRENT_VERSION=$(head -n 1 "Dockerfile" | grep "FROM" | cut -d ":" -f 2 | cut -d " " -f 1)
echo "current_version=${CURRENT_VERSION}" >> "$GITHUB_ENV"
- name: Set new tag
if: env.previous_version != env.current_version
uses: rickstaa/action-create-tag@v1
with:
github_token: ${{ secrets.PAT }}
tag: ${{ env.current_version }}
message: "Release ${{ env.current_version }}"