Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Jinnrry/PMail
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinnrry committed Aug 14, 2023
2 parents 9b2b7d5 + 55d4bbe commit 449f5ce
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Docker Image CI

on:
push:
tags:
- "*"

env:
REGISTRY: ghcr.io

jobs:
build-and-push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Get version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}

- uses: actions/checkout@v3

- name: set lower case repository name
run: |
echo "REPOSITORY_LC=${REPOSITORY,,}" >>${GITHUB_ENV}
env:
REPOSITORY: '${{ github.repository }}'

- name: Log in to the Container registry
uses: docker/[email protected]
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker images
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: |
${{ env.REGISTRY }}/${{ env.REPOSITORY_LC }}:${{ steps.get_version.outputs.VERSION }}
${{ env.REGISTRY }}/${{ env.REPOSITORY_LC }}:latest

0 comments on commit 449f5ce

Please sign in to comment.