Skip to content

v2.5.7

v2.5.7 #30

Workflow file for this run

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