Skip to content

Instantly share code, notes, and snippets.

@kleeadrian
Last active November 26, 2024 01:07
Show Gist options
  • Save kleeadrian/f096878f76b5fb759976adce9550c9a5 to your computer and use it in GitHub Desktop.
Save kleeadrian/f096878f76b5fb759976adce9550c9a5 to your computer and use it in GitHub Desktop.
GitHub Actions push to Buildkite Packages example
name: Publish to Buildkite Packages
on:
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup node 12
uses: actions/setup-node@v3.5.1
with:
node-version: '12'
cache: 'npm'
- name: Install dependencies
run: |
npm install --silent
- name: Build site
run: npm run build
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Container Registry
uses: docker/login-action@v1
with:
registry: packages.buildkite.com
username: buildkite
password: ${{ secrets.BUILDKITE_TOKEN }}
- name: Build and push
id: build-image
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: packages.buildkite.com/<buildkite org>/<buildkite registry>/<package name>:${{ github.event.pull_request.head.sha || github.sha }}
- run: |
echo ${{ steps.build-image-outputs.metadata }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment