-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (38 loc) · 1.34 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: e2e
on:
push:
branches:
- main
pull_request:
branches:
- "*"
workflow_dispatch:
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
build_and_push:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, nscloud-ubuntu-22.04-amd64-2x8]
runs-on: ${{ matrix.os }}
name: Build and push a sample application to Namespace Cloud
timeout-minutes: 5
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Configure access to Namespace
id: nscloud
uses: namespacelabs/nscloud-setup@v0
- name: Configure buildx
uses: ./ # Uses an action in the root directory
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
file: .github/workflows/testdata/Dockerfile
push: ${{ github.ref_name == 'main' }}
tags: "${{ steps.nscloud.outputs.registry-address }}/nscloud-setup-buildx-action/testdata/server:latest"
cache-from: "type=registry,ref=${{ steps.nscloud.outputs.registry-address }}/nscloud-setup-buildx-action/testdata/server:buildcache"
cache-to: "type=registry,ref=${{ steps.nscloud.outputs.registry-address }}/nscloud-setup-buildx-action/testdata/server:buildcache,mode=max"