Skip to content

Commit fdb9b43

Browse files
author
Slingexe
authored
Changed Workflows
1 parent 23e524b commit fdb9b43

3 files changed

Lines changed: 7 additions & 131 deletions

File tree

.github/workflows/docker-publish.yaml

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ jobs:
1717
steps:
1818
- name: Checkout Repository
1919
uses: actions/checkout@v4
20+
with: |
21+
if [ github.event.inputs.version ]; then
22+
ref: my-branch
23+
fi
2024
2125
- name: Set up QEMU
2226
uses: docker/setup-qemu-action@v3
@@ -37,8 +41,8 @@ jobs:
3741
username: ${{ secrets.DOCKERHUB_USER }}
3842
password: ${{ secrets.DOCKERHUB_AT }}
3943

40-
- name: Determine version
41-
id: use_version
44+
- name: SetVars
45+
id: set_vars
4246
run: |
4347
# If the workflow is triggered by a release, use the release tag
4448
if [ "${GITHUB_EVENT_NAME}" == "release" ]; then
@@ -51,20 +55,6 @@ jobs:
5155
echo "VERSION=$VERSION_LOWER" >> $GITHUB_ENV
5256
echo "REPO_NAME=$REPO_NAME" >> $GITHUB_ENV
5357
54-
- name: Retrieve previous release version
55-
id: previous_version
56-
run: |
57-
PREV_VERSION=$(gh release list --limit 2 --json tagName --jq '.[1].tagName' || echo "")
58-
if [ -z "$PREV_VERSION" ]; then
59-
echo "No previous version found, skipping retagging."
60-
echo "PREV_VERSION=" >> $GITHUB_ENV
61-
else
62-
echo "Previous version: $PREV_VERSION"
63-
echo "PREV_VERSION=$PREV_VERSION" >> $GITHUB_ENV
64-
fi
65-
env:
66-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67-
6858
- name: Build and Push Docker Image (GitHub Packages)
6959
run: |
7060
docker buildx build --platform linux/amd64,linux/arm64 \
@@ -77,19 +67,4 @@ jobs:
7767
docker buildx build --platform linux/amd64,linux/arm64 \
7868
--tag ${{ env.REPO_NAME }}:${{ env.VERSION }} \
7969
--tag ${{ env.REPO_NAME }}:latest \
80-
--push .
81-
82-
- name: Clean up unused Docker images
83-
run: |
84-
# Remove untagged (dangling) images
85-
docker image prune -f
86-
# Clean up BuildKit cache (optional but helpful)
87-
docker builder prune -f
88-
89-
- name: Retag and Push Previous Version (DockerHub)
90-
if: env.PREV_VERSION != ''
91-
run: |
92-
docker pull ${{ env.REPO_NAME }}:latest
93-
docker tag ${{ env.REPO_NAME }}:latest \
94-
${{ env.REPO_NAME }}:${{ env.PREV_VERSION }}
95-
docker push ${{ env.REPO_NAME }}:${{ env.PREV_VERSION }}
70+
--push .

.github/workflows/github-docker-publish.yaml

Lines changed: 0 additions & 79 deletions
This file was deleted.

.github/workflows/packages-cleanup.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)