Fix unique name #2
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: Build | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Release | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
# workaround as there is no way to get the Release name or just the tag name by itself | |
- name: Extract branch name | |
shell: bash | |
run: echo "##[set-output name=tag;]$(echo ${GITHUB_REF#refs/tags/})" | |
id: extract_tag | |
- name: Build Lab Image | |
env: | |
VERSION: ${{ github.sha }} | |
run: | | |
make build version=$VERSION | |
- name: Prune dangling images | |
run: docker image prune -f | |
- name: Login to GitHub Package Registry | |
uses: docker/login-action@v1 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish version to GitHub Package Registry | |
env: | |
VERSION: ${{ github.sha }} | |
run: | | |
make release version=$VERSION |