Skip to content

Commit

Permalink
Update version.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Drazzilb08 committed Feb 26, 2024
1 parent 650a1de commit d2bd6fe
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ on:
tags:
- v*


jobs:

docker-version:
runs-on: ubuntu-latest

Expand All @@ -17,11 +19,11 @@ jobs:

- name: Get the version
id: get_version
run: echo "VERSION=${{ github.ref/refs\/tags\// }}" >> ${{ github.workspace }}/output.txt
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT

- name: Extract branch name
shell: bash
run: echo "branch=${{ github.head_ref:-${{ github.ref#refs/heads/ }} }}" >> ${{ github.workspace }}/output.txt
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch

- name: Build GH Container
Expand All @@ -40,9 +42,10 @@ jobs:
id: docker_build
uses: docker/build-push-action@v5
with:
context: ./
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64,linux/arm/v7
build-args: |
"BRANCH=${{ steps.extract_branch.outputs.branch }}"
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/userscripts:${{ steps.get_version.outputs.VERSION }}

Expand Down

0 comments on commit d2bd6fe

Please sign in to comment.