Skip to content

Commit

Permalink
automate build of packer-resource in github actions + publish in ghcr
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrondelez committed Aug 28, 2024
1 parent 2fac848 commit b62b093
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/publish-packer-resource-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish Actions Runner Image

on:
push:
branches:
- master

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository_owner }}/packer-resource

jobs:
build-latest:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU #emulation support with QEMU to be able to build against more platforms.
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push the container to GitHub Container Registry using the latest tag
uses: docker/[email protected]
with:
context: .
file: Dockerfile
platforms: |
linux/amd64
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
push: true
provenance: false

0 comments on commit b62b093

Please sign in to comment.