Skip to content

Commit 2b5c80e

Browse files
committed
update: publish-to-github action
1 parent c4fba14 commit 2b5c80e

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

.github/workflows/publish_docker_images.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
tags: ${{ secrets.DOCKERHUB_USERNAME }}/opensca-cli:latest, ${{ secrets.DOCKERHUB_USERNAME }}/opensca-cli:${{ env.VERSION }}
4646

4747
publish-to-github:
48-
name: Publish to GitHub
48+
name: Publish to Github
4949
runs-on: ubuntu-latest
5050
steps:
5151
- name: Login to GitHub Container Registry
@@ -56,15 +56,15 @@ jobs:
5656
password: ${{ secrets.GITHUB_TOKEN }}
5757
- name: Set VERSION ENV
5858
run: echo VERSION=$(echo ${GITHUB_REF} | rev | cut -d'/' -f 1 | rev ) >> ${GITHUB_ENV}
59-
# - name: Convert to lowercase
60-
# run: |
61-
# echo LATEST_TAG=ghcr.io/${{ github.repository }}/opensca-cli:latest | tr '[:upper:]' '[:lower:]' >> ${GITHUB_ENV}
62-
# echo VERSION_TAG=ghcr.io/${{ github.repository }}/opensca-cli:${{ env.VERSION }} | tr '[:upper:]' '[:lower:]' >> ${GITHUB_ENV}
63-
# - name: Print env variables
64-
# run: |
65-
# echo "GITHUB_REPOSITORY=${{ github.repository }}"
66-
# echo "LATEST_TAG=${{ env.LATEST_TAG }}"
67-
# echo "VERSION_TAG=${{ env.VERSION_TAG }}"
59+
- name: Convert to lowercase
60+
run: |
61+
echo latest_tag=ghcr.io/${{ github.repository_owner }}/opensca-cli:latest | tr '[:upper:]' '[:lower:]' >> ${GITHUB_ENV}
62+
echo version_tag=ghcr.io/${{ github.repository_owner }}/opensca-cli:${{ env.VERSION }} | tr '[:upper:]' '[:lower:]' >> ${GITHUB_ENV}
63+
- name: Print env variables
64+
run: |
65+
echo "GITHUB_REPOSITORY=${{ github.repository_owner }}"
66+
echo "LATEST_TAG=${{ env.latest_tag }}"
67+
echo "VERSION_TAG=${{ env.version_tag }}"
6868
- name: Build and push to GitHub Packages
6969
uses: docker/build-push-action@v5
7070
with:
@@ -74,4 +74,4 @@ jobs:
7474
push: true
7575
build-args: |
7676
VERSION=${{ env.VERSION }}
77-
tags: ghcr.io/${{ github.repository }}/opensca-cli:latest, ghcr.io/${{ github.repository }}/opensca-cli:${{ env.VERSION }}
77+
tags: ${{ env.latest_tag }}, ${{ env.version_tag }}

0 commit comments

Comments
 (0)