Version 1.18.5 #27
Workflow file for this run
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: Docker Image CI | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set env RELEASE_VERSION | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV | |
- name: Build the Docker image | |
run: docker build . --file Dockerfile --tag asanrom/pmv:latest | |
- name: Docker Login | |
uses: docker/[email protected] | |
with: | |
username: asanrom | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Add version tag to Docker image | |
run: docker tag asanrom/pmv:latest asanrom/pmv:${{ env.RELEASE_VERSION }} | |
- name: Push the Docker image (Current Version) | |
run: docker push asanrom/pmv:${{ env.RELEASE_VERSION }} | |
- name: Push the Docker image (Latest) | |
run: docker push asanrom/pmv:latest | |
- name: Docker Login (GitHub Packages) | |
uses: docker/[email protected] | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Tag version (GitHub Packages) | |
run: docker tag asanrom/pmv:latest ghcr.io/agustinsrg/personalmediavault:${{ env.RELEASE_VERSION }} | |
- name: Tag latest (GitHub Packages) | |
run: docker tag asanrom/pmv:latest ghcr.io/agustinsrg/personalmediavault:latest | |
- name: Push the Docker image (GitHub Packages) (Current Version) | |
run: docker push ghcr.io/agustinsrg/personalmediavault:${{ env.RELEASE_VERSION }} | |
- name: Push the Docker image (GitHub Packages) (Latest) | |
run: docker push ghcr.io/agustinsrg/personalmediavault:latest | |