Skip to content

add release title

add release title #8

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches:
- docker_workflow
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Docker Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Set Repo Name to Lowercase
run: echo "REPO_NAME_LOWER=$(echo ${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV

Check failure on line 28 in .github/workflows/docker-build.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/docker-build.yml

Invalid workflow file

You have an error in your yaml syntax on line 28
- name: Build and Push Image
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/${{ env.REPO_NAME_LOWER }}/jobspy_api:latest
- name: Set Release Tag Name and Title
run: |
TAG_NAME=$(echo ${{ github.ref }} | sed -e 's/refs\/heads\///' -e 's/\//-/g')
echo "RELEASE_TAG=${TAG_NAME}-$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV
echo "RELEASE_TITLE=JobSpy Release for ${{ github.ref }} on $(date +'%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.RELEASE_TAG }}
release_name: Release ${{ env.RELEASE_TAG }}
draft: false
prerelease: false
- name: Attach Docker Image to Release
run: |
echo "Image ghcr.io/${{ github.repository }}/jobspy_api:latest is available under assets in the release."