Skip to content

Commit

Permalink
fix2
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrofaria committed Oct 6, 2023
1 parent 13d3ead commit 7ae93b1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build-and-push-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ jobs:
steps:
- name: Checkout and setup
uses: actions/checkout@v2

- name: Get the version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_OUTPUT"

- name: Docker meta
id: meta
uses: docker/metadata-action@v5
Expand All @@ -25,15 +27,17 @@ jobs:
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v5
with:
build-args: |
VERSION=$VERSION
VERSION=${{ steps.get_version.outputs.VERSION }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
6 changes: 3 additions & 3 deletions .github/workflows/build-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
go-version: '^1.21.0'
- name: Get the version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_ENV"
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> "$GITHUB_OUTPUT"
- name: Build accweb release
run: chmod u+x ./build/build_release.sh && ./build/build_release.sh ${VERSION}
run: chmod u+x ./build/build_release.sh && ./build/build_release.sh ${{ steps.get_version.outputs.VERSION }}
- uses: ncipollo/release-action@v1
with:
artifacts: 'releases/accweb_${VERSION}.zip'
artifacts: 'releases/accweb_${{ steps.get_version.outputs.VERSION }}.zip'
generateReleaseNotes: true
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 7ae93b1

Please sign in to comment.