Skip to content

Docker Releaser Workflow #34

Docker Releaser Workflow

Docker Releaser Workflow #34

Workflow file for this run

name: Docker Releaser Workflow
on:
workflow_dispatch:
inputs:
release_version:
type: string
description: release version when building docker containers (example; 2.0.0)
jobs:
build_aws_connector_docker_image:
name: Release docker images
runs-on: ubuntu-latest
steps:
- name: Login to Github Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout code
uses: actions/checkout@master
- name: Build Docker image
uses: docker/build-push-action@v2
with:
context: .
build-args: |
SHA1VER=${{ env.SHA1VER }}
VERSION=${{ github.event.inputs.release_version }}
tags: |
ghcr.io/lamassuiot/lamassu-ui:${{ github.event.inputs.release_version }}
ghcr.io/lamassuiot/lamassu-ui:latest
push: true
- name: Create tag
uses: actions/github-script@v5
with:
script: |
github.rest.git.createRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: 'refs/tags/${{ github.event.inputs.release_version }}',
sha: context.sha
})
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.event.inputs.release_version }}
release_name: Release v${{ github.event.inputs.release_version }}
body: |
Changes in this Release
- First Change
- Second Change
draft: false
prerelease: false