diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index 8e4f5ce..d37c72b 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -16,8 +16,6 @@ jobs: name: Publish to Docker Hub uses: ./.github/workflows/publish_docker.yml needs: test - with: - tag: dev-latest secrets: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} \ No newline at end of file + DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 53a3187..a6833a5 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -12,12 +12,3 @@ jobs: test: name: Test uses: ./.github/workflows/test.yml - publish_docker: - name: Publish to Docker Hub - uses: ./.github/workflows/publish_docker.yml - needs: test - with: - tag: latest - secrets: - DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} - DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/publish_docker.yml b/.github/workflows/publish_docker.yml index 1a53099..272320b 100644 --- a/.github/workflows/publish_docker.yml +++ b/.github/workflows/publish_docker.yml @@ -4,10 +4,6 @@ name: Publish to Docker Hub on: workflow_call: - inputs: - tag: - required: true - type: string secrets: DOCKERHUB_USERNAME: required: true @@ -21,12 +17,23 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + - name: Docker meta + id: meta + uses: docker/metadata-action@v5 + with: + images: | + paradoxalarminterface/pai + tags: | + type=ref,event=branch + type=pep440,pattern={{version}} + type=pep440,pattern={{major}}.{{minor}} + type=pep440,pattern={{major}} - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v3 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} @@ -37,4 +44,5 @@ jobs: context: . platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm64/v8 push: true - tags: paradoxalarminterface/pai:${{ inputs.tag }} + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ebfa8d0..953a5c1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,8 +12,6 @@ jobs: name: Publish to Docker Hub uses: ./.github/workflows/publish_docker.yml needs: test - with: - tag: ${{ github.event.release.tag_name }} secrets: DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}