Skip to content

Initial commit

Initial commit #1

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
tags: [ '[0-9]+.[0-9]+.[0-9]+' ]
pull_request:
branches: [ main ]
env:
RELEASING: ${{ startsWith(github.ref, 'refs/tags/') }}
DOCKERHUB_REPO: tenacom/buildvana-builder
TEST_TAG: ${{ env.DOCKERHUB_REPO }}:test

Check failure on line 13 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. .github/workflows/ci.yml (Line: 13, Col: 13): Unrecognized named-value: 'env'. Located at position 1 within expression: env.DOCKERHUB_REPO
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Generate Docker mrepository metadata
id: meta
if: ${{ env.RELEASING }}
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKERHUB_REPO }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and load into Docker
uses: docker/build-push-action@v5
with:
context: .
load: true
tags: ${{ env.TEST_TAG }}
- name: Test
run: |
docker run --rm ${{ env.TEST_TAG }}
- name: Build and push
if: ${{ env.RELEASING }}
uses: docker/build-push-action@v5
with:
context: .
push: ${{ env.RELEASING }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}