Skip to content

Update .gitpod.yml (#2) #7

Update .gitpod.yml (#2)

Update .gitpod.yml (#2) #7

Workflow file for this run

name: Build & Push
on:
pull_request:
branches:
- main
- rc*/*
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v20.15.10
- "v[0-9]+.[0-9]+.[0-9]+-*" # Push events to matching v*, i.e. v20.15.10-rc5
env:
registry: docker.io
repository: finschia/cw-gitpod
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: login to the registry
uses: docker/login-action@v3
if: github.event_name != 'pull_request'
with:
registry: ${{env.registry}}
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_TOKEN}}
- name: extract metadata for docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{env.registry}}/${{env.repository}}
tags: |
type=semver,pattern={{version}}
- name: docker build
uses: docker/build-push-action@v5
with:
push: ${{github.event_name != 'pull_request'}}
tags: ${{steps.meta.outputs.tags}}
labels: ${{steps.meta.outputs.labels}}
platforms: linux/amd64
file: .gitpod.Dockerfile