Merge pull request #17 from quiode/dev #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Docker | |
on: | |
push: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Get Previous tag | |
id: previoustag | |
uses: "WyriHaximus/github-action-get-previous-tag@v1" | |
with: | |
prefix: v | |
- name: "❓ Find the release semantic version" | |
id: semver | |
uses: Steffo99/actions-semver@v0.3.5 | |
with: | |
string: "${{ steps.previoustag.outputs.tag }}" | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: | | |
${{ secrets.DOCKERHUB_USERNAME }}/fdroid-repo-manager:latest | |
${{ secrets.DOCKERHUB_USERNAME }}/fdroid-repo-manager:${{ steps.semver.outputs.core }} | |
${{ secrets.DOCKERHUB_USERNAME }}/fdroid-repo-manager:${{ steps.semver.outputs.pair }} | |
${{ secrets.DOCKERHUB_USERNAME }}/fdroid-repo-manager:${{ steps.semver.outputs.major }} |