Skip to content

Merge pull request #22 from ciccionamente/PHPMailer-update #14

Merge pull request #22 from ciccionamente/PHPMailer-update

Merge pull request #22 from ciccionamente/PHPMailer-update #14

Workflow file for this run

name: Docker
on:
push:
branches:
- main
env:
IMAGE_NAME: '${{ github.event.repository.name }}'
jobs:
push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@main
- name: Log into registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
- name: Build image
run: docker build . -t ciccionamente/weexpire:latest
- name: Push image
run: |
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
[ "$VERSION" == "main" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag ciccionamente/weexpire:latest $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION