Skip to content

Commit

Permalink
EZP-32364: Use docker image, make automatic docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
ibexa-yuna committed Mar 24, 2021
1 parent 56988ee commit d623c52
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish Docker image
on:
release:
types: [published]
jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
steps:
- name: Set Env
run: |
echo "BUILD_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
echo "BUILD_SHA=${GITHUB_SHA:0:7}" >> $GITHUB_ENV
- name: Docker Login
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push to GitHub Packages
uses: docker/build-push-action@v2
with:
tags: |
ghcr.io/${{ github.repository }}:${{ env.BUILD_TAG }}
ghcr.io/${{ github.repository }}:${{ env.BUILD_SHA }}
push: true
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ outputs:
description: "Output from the action"
runs:
using: "docker"
image: "Dockerfile"
image: "docker://ghcr.io/ibexa-yuna/version-logic-action:v1.0.0"

0 comments on commit d623c52

Please sign in to comment.