fixed docker hub ref #65
Workflow file for this run
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: Release UDX Worker | |
on: | |
push: | |
# branches: | |
# - latest | |
jobs: | |
test-pipeline: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
outputs: | |
semVer: ${{ steps.gitversion.outputs.semVer }} | |
changelog: ${{ steps.changelog.outputs.changelog }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# - name: Set up Docker Buildx | |
# uses: docker/setup-buildx-action@v3 | |
# - name: Run Development Pipeline | |
# run: make dev-pipeline | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/setup@v2 | |
with: | |
versionSpec: "5.12.0" | |
- name: Determine Version | |
id: gitversion | |
uses: gittools/actions/gitversion/execute@v2 | |
with: | |
useConfigFile: true | |
configFilePath: ci/git-version.yml | |
- name: Generate changelog | |
id: changelog | |
run: | | |
git log $(git describe --tags --abbrev=0)..HEAD -- . --pretty=format:"- %s" > changelog.txt | |
CHANGELOG=$(cat changelog.txt | jq -sRr @uri) | |
echo "changelog<<EOF" >> $GITHUB_ENV | |
echo "$CHANGELOG" >> $GITHUB_ENV | |
echo "EOF" >> $GITHUB_ENV | |
# github-release: | |
# runs-on: ubuntu-latest | |
# needs: [test-pipeline] | |
# permissions: | |
# contents: write | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v4 | |
# with: | |
# fetch-depth: 0 | |
# - name: Configure git for pushing | |
# run: | | |
# git config --global user.email "[email protected]" | |
# git config --global user.name "UDX Worker" | |
# - name: Create GitHub Tag | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# run: | | |
# git tag ${{ needs.test-pipeline.outputs.semVer }} | |
# git push origin ${{ needs.test-pipeline.outputs.semVer }} | |
# - name: Create GitHub release | |
# uses: actions/create-release@v1 | |
# with: | |
# tag_name: ${{ needs.test-pipeline.outputs.semVer }} | |
# release_name: ${{ needs.test-pipeline.outputs.semVer }} | |
# body: ${{ needs.test-pipeline.outputs.changelog }} | |
# draft: false | |
# prerelease: false | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
docker-release: | |
runs-on: ubuntu-latest | |
# needs: [test-pipeline, github-release] | |
needs: [test-pipeline] | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: "fqjony" | |
password: ${{ secrets.DOCKER_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v2 | |
with: | |
context: . | |
file: ./Dockerfile | |
push: true | |
tags: | | |
usabilitydynamics/udx-worker:${{ needs.test-pipeline.outputs.semVer }} | |
usabilitydynamics/udx-worker:latest | |
build-args: | | |
GIT_VERSION=${{ needs.test-pipeline.outputs.semVer }} | |
- name: Log out from Docker Hub | |
run: docker logout |