v2.5.5 #28
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: Build | |
on: | |
release: | |
types: [published] | |
jobs: | |
build: | |
name: Build image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Login to Registry | |
run: | | |
echo ${{ secrets.DOCKER_PASSWORD }} | \ | |
docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v4 | |
- name: Build image | |
run: | | |
export VERSION=${GITHUB_REF#refs/tags/} | |
export VERSION_MINOR=$(echo ${VERSION} | awk '{match($0,"v[0-9].[0-9]",a)}END{print a[0]}') | |
export VERSION_MAJOR=$(echo ${VERSION} | awk '{match($0,"v[0-9]",a)}END{print a[0]}') | |
docker build --build-arg ACTION_VERSION=${VERSION} \ | |
-t morphy/revive-action \ | |
-t morphy/revive-action:${VERSION} \ | |
-t morphy/revive-action:${VERSION_MINOR} \ | |
-t morphy/revive-action:${VERSION_MAJOR} . | |
- name: Publish image | |
run: docker push --all-tags morphy/revive-action | |
- name: Logout | |
run: docker logout |