Skip to content

chores: refresh builder image #70

chores: refresh builder image

chores: refresh builder image #70

Workflow file for this run

name: Docker Image CI
on:
push:
branches:
- main
tags:
- 'v*'
paths-ignore:
- '**.md'
pull_request:
branches:
- main
paths-ignore:
- '**.md'
jobs:
dev:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
name=ghcr.io/edgetx/edgetx-dev
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push edgetx-dev
uses: docker/build-push-action@v5
with:
context: dev/
file: dev/Dockerfile
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=docker,dest=/tmp/dev-image.tar
- name: Upload edgetx-dev
uses: actions/upload-artifact@v3
with:
name: dev-image
path: /tmp/dev-image.tar
builder:
runs-on: ubuntu-latest
needs: dev
steps:
- name: Download dev-image
uses: actions/download-artifact@v3
with:
name: dev-image
path: /tmp
- name: Load image
run: |
docker load --input /tmp/dev-image.tar
docker image ls -a
gitpod:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
name=ghcr.io/edgetx/gitpod-workspace
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push edgetx-dev
uses: docker/build-push-action@v3
with:
context: gitpod/
file: gitpod/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}