Skip to content

Zephyr v3.4.0 -> v3.5.0-rc2 #20

Zephyr v3.4.0 -> v3.5.0-rc2

Zephyr v3.4.0 -> v3.5.0-rc2 #20

Workflow file for this run

name: publish
on:
push:
tags:
- 'v*.*.*'
pull_request:
branches:
- 'main'
env:
REGISTRY: ghcr.io
IMAGE_NAME: 'bcdevices/zephyr'
jobs:
build:
name: build-and-push-image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
#id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Workaround: https:/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v2
# Login against a Docker registry except on PR
# https:/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Extract metadata (tags, labels) for Docker
# https:/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
## generate Docker tags based on the following events/attributes
#tags: |
# type=schedule
# type=ref,event=branch
# type=ref,event=pr
# type=semver,pattern={{version}}
# type=semver,pattern={{major}}.{{minor}}
# type=semver,pattern={{major}}
# type=sha
# Build and push Docker image with Buildx (don't push on PR)
# https:/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v4
with:
context: .
provenance: false
push: ${{ github.event_name != 'pull_request' }}
build-args: gh_access_token=${{ secrets.BUILDBOT_GITHUB_TOKEN }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max