From 68c0c6e79445f8d246722cbd161c15ae2c68d9ff Mon Sep 17 00:00:00 2001 From: Fernando Falci Date: Thu, 23 Nov 2023 13:18:10 +0100 Subject: [PATCH 1/2] Add Docker workflow for building and pushing images --- .github/workflows/docker.yaml | 60 +++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/docker.yaml diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml new file mode 100644 index 00000000..58a2f9b6 --- /dev/null +++ b/.github/workflows/docker.yaml @@ -0,0 +1,60 @@ +name: Docker + +on: + push: + branches: + - master + tags: + - '*' + +jobs: + docker: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: | + ${{ secrets.DOCKERHUB_ACCOUNT }}/hnsd + ghcr.io/${{ github.repository }} + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=raw,value=latest,enable=${{ github.ref != 'refs/heads/master' }} + type=edge + flavor: | + latest=false + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Login to GHCR + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v3 + with: + context: . + push: true + platforms: linux/amd64,linux/arm64 + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} From d75c8b2e26bcea026b73a6ad391aa4ec1e44c3cf Mon Sep 17 00:00:00 2001 From: Fernando Falci Date: Thu, 23 Nov 2023 14:19:22 +0100 Subject: [PATCH 2/2] Update node version to LTS in test workflows --- .github/workflows/test-windows.yaml | 11 ++++++----- .github/workflows/test.yml | 5 +++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-windows.yaml b/.github/workflows/test-windows.yaml index 54a370c1..28179254 100644 --- a/.github/workflows/test-windows.yaml +++ b/.github/workflows/test-windows.yaml @@ -33,12 +33,13 @@ jobs: run: ./test_hnsd - name: Setup Integration - uses: actions/setup-node@v3.5.1 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: lts/* + check-latest: true - name: Integration Tests working-directory: ./integration - run: | - npm install - npm run test + run: | + npm install + npm run test diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 91cca2e5..9c14344e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -31,9 +31,10 @@ jobs: run: ./test_hnsd - name: Setup Integration - uses: actions/setup-node@v3.5.1 + uses: actions/setup-node@v4 with: - node-version: 18 + node-version: lts/* + check-latest: true - name: Integration Tests working-directory: ./integration