Compare commits
3 Commits
v3.16.0
...
49bc46cfa9
| Author | SHA1 | Date | |
|---|---|---|---|
|
49bc46cfa9
|
|||
|
d3395abf94
|
|||
| e88646cd14 |
@@ -17,9 +17,6 @@ jobs:
|
||||
shell: bash
|
||||
run: echo "AKKOMA_VERSION=${GITHUB_REF_NAME#refs/tags/v}" >> $GITHUB_ENV
|
||||
|
||||
- name: Install Docker
|
||||
run: curl -fsSL https://get.docker.com | sh
|
||||
|
||||
- name: Configure Docker credentials
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
name: Check for a new Akkoma release
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '2 * * * *'
|
||||
|
||||
jobs:
|
||||
check-releases:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Extract latest version from Akkoma forge
|
||||
run: |
|
||||
set -e # Fail on error
|
||||
LATEST_VERSION=$(curl -s https://akkoma.dev/AkkomaGang/akkoma/tags.rss | \
|
||||
grep '<link>https://akkoma.dev/AkkomaGang/akkoma/releases/tag/' | \
|
||||
head -n 1 | rev | cut -d '/' -f 2 | rev | cut -d '<' -f 1)
|
||||
LATEST_VERSION=${LATEST_VERSION#v}
|
||||
echo "Latest Akkoma version: $LATEST_VERSION"
|
||||
echo "LATEST_VERSION=$LATEST_VERSION" >> $GITHUB_ENV
|
||||
|
||||
- name: Check if tag exists
|
||||
id: check
|
||||
run: |
|
||||
if git rev-parse "v${LATEST_VERSION}" >/dev/null 2>&1
|
||||
then
|
||||
echo "Tag v${LATEST_VERSION} already exists."
|
||||
echo "new_version=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "New version detected: ${LATEST_VERSION}"
|
||||
echo "new_version=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config user.name "Gitea Actions"
|
||||
git config user.email "actions@git.quent1.fr"
|
||||
git remote set-url origin "https://${{ secrets.GITEA_TOKEN }}@git.quent1.fr/${{ github.repository }}"
|
||||
|
||||
- name: Create and push new tag
|
||||
if: steps.check.outputs.new_version == 'true'
|
||||
run: |
|
||||
git tag "v${LATEST_VERSION}"
|
||||
git push origin "v${LATEST_VERSION}"
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM alpine:3.19
|
||||
FROM alpine:3
|
||||
|
||||
ENV MIX_ENV prod
|
||||
ENV PATH "${PATH}:/opt/akkoma/bin"
|
||||
|
||||
Reference in New Issue
Block a user