Skip to content

Merge pull request #38 from Chia-Network/snyk-fix-9bea5063740448703bd… #117

Merge pull request #38 from Chia-Network/snyk-fix-9bea5063740448703bd…

Merge pull request #38 from Chia-Network/snyk-fix-9bea5063740448703bd… #117

Workflow file for this run

name: Build Aptly Image
on:
push:
branches:
- main
paths:
- 'aptly/*'
- '.github/workflows/build-aptly.yml'
pull_request:
workflow_dispatch:
schedule:
- cron: '30 12 * * 5'
concurrency:
# SHA is added to the end if on `main` to let all main workflows run
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == 'refs/heads/main' && github.sha || '' }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Docker Context for Buildx
id: buildx-context
run: |
docker context create builders
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
version: latest
endpoint: builders
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PAT }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
chianetwork/aptly
tags: |
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
type=sha,format=long
- name: Build Docker Container
uses: docker/build-push-action@v4
with:
context: ./aptly
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}