Clean up code #1
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
name: Bus | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Extract Tag version | |
id: tag_version | |
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Prepare the credentials | |
run: | | |
echo "ELLA_ACCESS_TOKEN=${{ secrets.ELLA_ACCESS_TOKEN }}" > .github/credentials/.env | |
- name: build | |
run: | | |
GIT_COMMIT=$(git rev-list -1 HEAD) | |
VERSION=${{ steps.tag_version.outputs.VERSION }} | |
docker build \ | |
--build-arg GIT_COMMIT=$GIT_COMMIT \ | |
--build-arg VERSION=$VERSION \ | |
--no-cache \ | |
--progress=plain \ | |
--secret id=_env,src=.github/credentials/.env \ | |
-t ellato/bus:$VERSION -t ellato/bus:latest . | |
echo ${{ secrets.ELLA_DOCKER_TOKEN }} | docker login -u ellato --password-stdin | |
docker push ellato/bus:$VERSION | |
docker push ellato/bus:latest |