99 runs-on : ubuntu-latest
1010 steps :
1111 - uses : actions/checkout@v2
12+ - name : Get the version
13+ id : get_version
14+ run : echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
15+ shell : bash
1216 - name : Login to GitHub Container Registry
1317 uses : docker/login-action@v1
1418 with :
@@ -19,17 +23,17 @@ jobs:
1923 - name : Build base image
2024 run : docker build -t ghcr.io/${{ github.repository_owner }}/ubit-toolchain:latest .
2125 - name : Tag same base image with the versioned tag
22- run : docker tag ghcr.io/${{ github.repository_owner }}/ubit-toolchain:latest ghcr.io/${{ github.repository_owner }}/ubit-toolchain:${{ github.ref }}
26+ run : docker tag ghcr.io/${{ github.repository_owner }}/ubit-toolchain:latest ghcr.io/${{ github.repository_owner }}/ubit-toolchain:${{ steps.get_version.outputs.VERSION }}
2327 - name : Push base images to ghcr.io
2428 run : |
2529 docker push ghcr.io/${{ github.repository_owner }}/ubit-toolchain:latest
26- docker push ghcr.io/${{ github.repository_owner }}/ubit-toolchain:${{ github.ref }}
30+ docker push ghcr.io/${{ github.repository_owner }}/ubit-toolchain:${{ steps.get_version.outputs.VERSION }}
2731
2832 - name : Build codespaces image
2933 run : docker build -t ghcr.io/${{ github.repository_owner }}/devcontainer-ubit:latest .
3034 - name : Tag same codespaces image with the versioned tag
31- run : docker tag ghcr.io/${{ github.repository_owner }}/devcontainer-ubit:latest ghcr.io/${{ github.repository_owner }}/devcontainer-ubit:${{ github.ref }}
35+ run : docker tag ghcr.io/${{ github.repository_owner }}/devcontainer-ubit:latest ghcr.io/${{ github.repository_owner }}/devcontainer-ubit:${{ steps.get_version.outputs.VERSION }}
3236 - name : Push codespaces images to ghcr.io
3337 run : |
3438 docker push ghcr.io/${{ github.repository_owner }}/devcontainer-ubit:latest
35- docker push ghcr.io/${{ github.repository_owner }}/devcontainer-ubit:${{ github.ref }}
39+ docker push ghcr.io/${{ github.repository_owner }}/devcontainer-ubit:${{ steps.get_version.outputs.VERSION }}
0 commit comments