trying new method #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script is used to build a docker image and push it to docker hub | ||
name: Build and Push Docker Image | ||
on: | ||
push: | ||
branches: | ||
[devel] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
# first we need to check out the code | ||
steps: | ||
- name: Set up Python 3.12 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.12 | ||
- name: Check-out repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
# The docker image tag is the git release tag | ||
# If there is no release tag, then we will use the branch name | ||
# as the docker image tag | ||
- name: Get latest tag name | ||
id: last_tag | ||
run: | | ||
LATEST_TAG=$(git describe --tags --abbrev=0 | sed 's/^v//') | ||
echo $LATEST_TAG | ||
- name: Get latest tag name 2 | ||
id: last_tag | ||
Check failure on line 36 in .github/workflows/build.yml GitHub Actions / Build and Push Docker ImageInvalid workflow file
|
||
run: | | ||
echo "LATEST_TAG_NEW=$(git describe --tags --abbrev=0 | sed 's/^v//')" >> "$GITHUB_ENV" | ||
- name: Print latest tag name | ||
run: | | ||
printf "%s\n" "${LATEST_TAG_NEW}" | ||