Skip to content

Initial commit

Initial commit #3

Workflow file for this run

name: Publish
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
docker:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
strategy:
matrix:
config:
- tags: [latest, v0.30, v0.30.1]
rustc: v1.78.0
node: v22.8.0
solana: v1.18.17
anchor: v0.30.1
- tags: [v0.30.0]
rustc: v1.78.0
node: v22.8.0
solana: v1.18.17
anchor: v0.30.0
- tags: [v0.29, v0.29.0]
rustc: v1.78.0
node: v22.8.0
solana: v1.17.25
anchor: v0.29.0
fail-fast: false
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build Docker Image
run: |
tags=""
for tag in ${{ matrix.config.tags }}; do
tags="$tags --tag ghcr.io/wjthieme/anchor-build:$tag"
done
docker build \
--build-arg RUSTC_VERSION=${{ matrix.config.rustc }} \
--build-arg NODE_VERSION=${{ matrix.config.node }} \
--build-arg SOLANA_CLI=${{ matrix.config.solana }} \
--build-arg ANCHOR_CLI=${{ matrix.config.anchor }} \
$tags .
- name: Push Docker Image
if: ${{ github.ref == 'refs/heads/main' }}
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
for tag in "${{ matrix.config.tags }}"; do
docker push ghcr.io/wjthieme/anchor-build:$tag
done