Test experimental new workflow #22
Workflow file for this run
This file contains hidden or 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: Lua Docker - Image CI | ||
| on: | ||
| push: | ||
| branches: [ master, ci-changes ] | ||
| pull_request: | ||
| branches: [ master ] | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Set up Docker Buildx | ||
| uses: docker/setup-buildx-action@v2 | ||
| - name: Configure Docker BuildKit | ||
| run: | | ||
| echo "DOCKER_BUILDKIT=1" >> $GITHUB_ENV | ||
| - name: Login to Docker Hub | ||
| if: github.event_name != 'pull_request' | ||
| uses: docker/login-action@v2 | ||
| with: | ||
| username: ${{ secrets.DOCKER_USERNAME }} | ||
| password: ${{ secrets.DOCKER_PASSWORD }} | ||
| - name: Extract version components | ||
| id: version | ||
| run: | | ||
| FULL_VERSION=$(cat .lua.release) | ||
| MAJOR_VERSION=$(echo $FULL_VERSION | cut -d'.' -f1) | ||
| MAJOR_MINOR_VERSION=$(echo $FULL_VERSION | cut -d'.' -f1,2) | ||
| echo "full_version=$FULL_VERSION" >> $GITHUB_OUTPUT | ||
| echo "major_version=$MAJOR_VERSION" >> $GITHUB_OUTPUT | ||
| echo "major_minor_version=$MAJOR_MINOR_VERSION" >> $GITHUB_OUTPUT | ||
| - name: Build and push | ||
| uses: docker/build-push-action@v4 | ||
| with: | ||
| context: . | ||
| push: ${{ github.event_name != 'pull_request' }} | ||
| tags: | | ||
| evandarwin/lua:${{ steps.version.outputs.full_version }} | ||
| evandarwin/lua:${{ steps.version.outputs.major_minor_version }} | ||
| evandarwin/lua:${{ steps.version.outputs.major_version }} | ||
| evandarwin/lua:latest | ||
| provenance: true | ||
| attestations: | ||
| - type: provenance | ||
| build-args: | | ||
| BUILD_DATE=${{ github.event.repository.updated_at }} | ||
| VCS_REF=${{ github.sha }} | ||
| VERSION=${{ steps.version.outputs.full_version }} | ||