Skip to content

Commit

Permalink
separating latest and dev github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
versun committed Jun 19, 2024
1 parent e50cbec commit 029bc58
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
name: Docker Image CI
name: dev:Docker Image CI

on:
release:
types: [published, prereleased]
types: [prereleased]
push:
branches:
- next

jobs:
build:
Expand Down Expand Up @@ -31,8 +34,6 @@ jobs:
with:
platforms: linux/arm64,linux/amd64
push: true
tags: |
rsstranslator/rsstranslator:${{ steps.latesttag.outputs.tag }}
${{ github.event.release.prerelease && 'rsstranslator/rsstranslator:dev' || 'rsstranslator/rsstranslator:latest' }}
tags: rsstranslator/rsstranslator:dev,rsstranslator/rsstranslator:${{ steps.latesttag.outputs.tag }}


39 changes: 39 additions & 0 deletions .github/workflows/latest-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: latest:Docker Image CI

on:
release:
types: [published]
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all tags and branches

- name: Get latest tag
id: latesttag
run: echo ::set-output name=tag::$(git describe --tags `git rev-list --tags --max-count=1`)

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push multi-platform Docker images
uses: docker/build-push-action@v5
with:
platforms: linux/arm64,linux/amd64
push: true
tags: rsstranslator/rsstranslator:latest,rsstranslator/rsstranslator:${{ steps.latesttag.outputs.tag }}


0 comments on commit 029bc58

Please sign in to comment.