aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/build-push-test-container.yaml
diff options
context:
space:
mode:
authorRuben ten Hove <ruben.tenhove@tno.nl>2022-06-21 18:52:43 +0200
committerRuben ten Hove <ruben.tenhove@tno.nl>2022-06-21 18:52:43 +0200
commita5822c7c2fc34e52defe630b418db7f856bc4f89 (patch)
treea4442e69afa4c27d952ddc77de0daa8939176722 /.github/workflows/build-push-test-container.yaml
parent01cb84051a9d4bfd33123902577f9310bb6c251d (diff)
downloadafl++-a5822c7c2fc34e52defe630b418db7f856bc4f89.tar.gz
various changes
Diffstat (limited to '.github/workflows/build-push-test-container.yaml')
-rw-r--r--.github/workflows/build-push-test-container.yaml50
1 files changed, 50 insertions, 0 deletions
diff --git a/.github/workflows/build-push-test-container.yaml b/.github/workflows/build-push-test-container.yaml
new file mode 100644
index 00000000..8a6d77d1
--- /dev/null
+++ b/.github/workflows/build-push-test-container.yaml
@@ -0,0 +1,50 @@
+name: Build, test and push container image
+
+on:
+ push:
+ branches:
+ - stable
+ - dev
+ tags:
+ - '*'
+
+jobs:
+ build:
+ name: Build, test and push container image
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v2
+ - name: Build image
+ uses: docker/build-push-action@v3
+ with:
+ context: .
+ platforms: linux/amd64,linux/arm64
+ load: true
+ tags: aflplusplus/aflplusplus:test
+ - name: Test linux/amd64 image
+ run: docker run --rm --platform linux/amd64 aflplusplus/aflplusplus:test make tests
+ - name: Test linux/arm64 image
+ run: docker run --rm --platform linux/arm64 aflplusplus/aflplusplus:test make tests
+ - name: Login to Dockerhub
+ uses: docker/login-action@v2
+ with:
+ username: ${{ secrets.DOCKER_USERNAME }}
+ password: ${{ secrets.DOCKER_TOKEN }}
+ - name: Publish ${{ github.ref_name }} to docker.io registry
+ uses: docker/build-push-action@v3
+ with:
+ context: .
+ platforms: linux/amd64,linux/arm64
+ push: true
+ tags: aflplusplus/aflplusplus:${{ github.ref_name }}
+ if: ${{ github.ref_name != 'stable' }}
+ - name: Publish stable and latest to docker.io registry
+ uses: docker/build-push-action@v3
+ with:
+ context: .
+ platforms: linux/amd64,linux/arm64
+ push: true
+ tags: aflplusplus/aflplusplus:${{ github.ref_name }},aflplusplus/aflplusplus:latest
+ if: ${{ github.ref_name == 'stable' }}