Skip to content

Fix dfx path issues in GH actions (#57) #139

Fix dfx path issues in GH actions (#57)

Fix dfx path issues in GH actions (#57) #139

Workflow file for this run

name: rust_dfx_base_image
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
# Just run it
pull_request:
branches:
- 'main'
paths:
- 'ic-dev-base/**'
push:
branches:
- main
paths:
- 'ic-dev-base/**'
env:
BUILD_TAG: rust1.77-dfx0.19
jobs:
ic-dev-base-image:
runs-on: 4x150g-runner
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GCP Registry
uses: docker/login-action@v2
with:
registry: us-central1-docker.pkg.dev
username: _json_key
password: ${{ secrets.GCP_DOCKER_KEY }}
- name: Login to Github Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.GH_PKG_LOGIN }}
password: ${{ secrets.GH_PKG_TOKEN }}
- name: Checkout template repo
uses: actions/checkout@v3
- name: Building base Rust/DFX image
uses: docker/build-push-action@v4
with:
push: ${{ (github.event_name != 'pull_request' && github.ref == 'refs/heads/main') || github.ref_type == 'tag' }}
context: ./ic-dev-base
tags: |
ghcr.io/${{ github.repository_owner }}/ic-dev-base:latest
ghcr.io/${{ github.repository_owner }}/ic-dev-base:${{ env.BUILD_TAG }}
us-central1-docker.pkg.dev/dfx-server/ci/ic-dev-base:latest
us-central1-docker.pkg.dev/dfx-server/ci/ic-dev-base:${{ env.BUILD_TAG }}