Skip to content

Commit

Permalink
Used for creating release
Browse files Browse the repository at this point in the history
  • Loading branch information
pankalog committed Feb 3, 2024
1 parent 48988da commit 4b91fb9
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,15 @@
name: Docker Image CI
name: Docker Image CI - Release

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:

build:

CreateRelease:
runs-on: ubuntu-latest

steps:


- name: Check out the code
uses: actions/checkout@v2

Expand Down Expand Up @@ -42,5 +37,21 @@ jobs:
file: ./Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ secrets.DOCKER_USERNAME }}/repotest:${{ env.SHORT_SHA }}
tags: ${{ secrets.DOCKER_USERNAME }}/repotest:${{ env.SHORT_SHA }} ,
${{ secrets.DOCKER_USERNAME }}/repotest:latest

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.SHORT_SHA }}
release_name: Release ${{ env.SHORT_SHA }}
draft: false
prerelease: false
body: |
Docker images built and pushed to DockerHub:
- `${{ secrets.DOCKER_USERNAME }}/repotest:${{ env.SHORT_SHA }}`
- `${{ secrets.DOCKER_USERNAME }}/repotest:latest`

0 comments on commit 4b91fb9

Please sign in to comment.